[plugins/qpa] Code tidying

Summary: This change cleans up includes, fixes coding style issues, etc.

Test Plan: Compiles.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22151
This commit is contained in:
Vlad Zagorodniy 2019-06-29 03:01:07 +03:00
parent f5b66a583d
commit c8280963e5
9 changed files with 12 additions and 19 deletions

View file

@ -29,12 +29,11 @@ namespace KWin
{ {
namespace QPA namespace QPA
{ {
class Integration;
class AbstractPlatformContext : public QPlatformOpenGLContext class AbstractPlatformContext : public QPlatformOpenGLContext
{ {
public: public:
explicit AbstractPlatformContext(QOpenGLContext *context, EGLDisplay display, EGLConfig config = nullptr); AbstractPlatformContext(QOpenGLContext *context, EGLDisplay display, EGLConfig config = nullptr);
virtual ~AbstractPlatformContext(); virtual ~AbstractPlatformContext();
void doneCurrent() override; void doneCurrent() override;

View file

@ -21,8 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "backingstore.h" #include "backingstore.h"
#include "../../wayland_server.h" #include "../../wayland_server.h"
#include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/buffer.h> #include <KWayland/Client/buffer.h>
#include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/shm_pool.h> #include <KWayland/Client/shm_pool.h>
#include <KWayland/Client/surface.h> #include <KWayland/Client/surface.h>

View file

@ -17,18 +17,17 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/ *********************************************************************/
#define WL_EGL_PLATFORM 1
#include "integration.h" #include "integration.h"
#include "platform.h"
#include "backingstore.h" #include "backingstore.h"
#include "nativeinterface.h" #include "nativeinterface.h"
#include "offscreensurface.h" #include "offscreensurface.h"
#include "screen.h" #include "screen.h"
#include "sharingplatformcontext.h" #include "sharingplatformcontext.h"
#include "window.h" #include "window.h"
#include "../../virtualkeyboard.h"
#include "../../main.h" #include "../../main.h"
#include "../../platform.h"
#include "../../screens.h" #include "../../screens.h"
#include "../../virtualkeyboard.h"
#include "../../wayland_server.h" #include "../../wayland_server.h"
#include <KWayland/Client/compositor.h> #include <KWayland/Client/compositor.h>
@ -41,14 +40,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QCoreApplication> #include <QCoreApplication>
#include <QtConcurrentRun> #include <QtConcurrentRun>
#include <qpa/qplatformwindow.h>
#include <qpa/qplatforminputcontext.h> #include <qpa/qplatforminputcontext.h>
#include <qpa/qplatforminputcontextfactory_p.h> #include <qpa/qplatforminputcontextfactory_p.h>
#include <qpa/qplatformwindow.h>
#include <qpa/qwindowsysteminterface.h> #include <qpa/qwindowsysteminterface.h>
#include <QtEventDispatcherSupport/private/qunixeventdispatcher_qpa_p.h>
#include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h> #include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h>
#include <QtThemeSupport/private/qgenericunixthemes_p.h> #include <QtThemeSupport/private/qgenericunixthemes_p.h>
#include <QtEventDispatcherSupport/private/qunixeventdispatcher_qpa_p.h>
namespace KWin namespace KWin
{ {
@ -122,7 +121,7 @@ void Integration::initialize()
} }
); );
connect(qApp->inputMethod(), &QInputMethod::visibleChanged, this, connect(qApp->inputMethod(), &QInputMethod::visibleChanged, this,
[this] { [] {
if (qApp->inputMethod()->isVisible()) { if (qApp->inputMethod()->isVisible()) {
if (QWindow *w = VirtualKeyboard::self()->inputPanel()) { if (QWindow *w = VirtualKeyboard::self()->inputPanel()) {
QWindowSystemInterface::handleWindowActivated(w, Qt::ActiveWindowFocusReason); QWindowSystemInterface::handleWindowActivated(w, Qt::ActiveWindowFocusReason);

View file

@ -31,7 +31,6 @@ namespace KWayland
{ {
namespace Client namespace Client
{ {
class Registry;
class Compositor; class Compositor;
class Shell; class Shell;
} }

View file

@ -22,12 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "window.h" #include "window.h"
#include "../../wayland_server.h" #include "../../wayland_server.h"
#include <QWindow>
#include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/compositor.h> #include <KWayland/Client/compositor.h>
#include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/surface.h> #include <KWayland/Client/surface.h>
#include <QWindow>
namespace KWin namespace KWin
{ {
namespace QPA namespace QPA

View file

@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "screen.h" #include "screen.h"
#include "platformcursor.h" #include "platformcursor.h"
#include "screens.h" #include "screens.h"
#include "wayland_server.h"
namespace KWin namespace KWin
{ {

View file

@ -18,11 +18,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/ *********************************************************************/
#include "sharingplatformcontext.h" #include "sharingplatformcontext.h"
#include "integration.h"
#include "offscreensurface.h" #include "offscreensurface.h"
#include "window.h" #include "window.h"
#include "../../platform.h" #include "../../platform.h"
#include "../../wayland_server.h"
#include "../../shell_client.h" #include "../../shell_client.h"
#include <logging.h> #include <logging.h>

View file

@ -26,13 +26,12 @@ namespace KWin
{ {
namespace QPA namespace QPA
{ {
class Integration;
class SharingPlatformContext : public AbstractPlatformContext class SharingPlatformContext : public AbstractPlatformContext
{ {
public: public:
explicit SharingPlatformContext(QOpenGLContext *context); explicit SharingPlatformContext(QOpenGLContext *context);
explicit SharingPlatformContext(QOpenGLContext *context, const EGLSurface &surface, EGLConfig config = nullptr); SharingPlatformContext(QOpenGLContext *context, const EGLSurface &surface, EGLConfig config = nullptr);
void swapBuffers(QPlatformSurface *surface) override; void swapBuffers(QPlatformSurface *surface) override;

View file

@ -17,8 +17,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/ *********************************************************************/
#include "integration.h"
#include "window.h" #include "window.h"
#include "integration.h"
#include "screens.h" #include "screens.h"
#include "../../shell_client.h" #include "../../shell_client.h"
#include "../../wayland_server.h" #include "../../wayland_server.h"