Commit graph

17 commits

Author SHA1 Message Date
Laurent Montel
86c6238cfa Don't use QtTest => use QTest + missing include 2023-07-04 10:38:21 +00:00
Vlad Zahorodnii
10df3b0eb0 Remove Qt 5 specific code 2023-02-28 18:30:26 +02:00
Xaver Hugl
8955a2420e replace all uses of QScopedPointer with std::unique_ptr 2022-08-04 12:30:09 +00:00
Vlad Zahorodnii
7096e3ead8 Run clang-format
The .clang-format file is based on the one in ECM except the following
style options:

 - AlwaysBreakBeforeMultilineStrings
 - BinPackArguments
 - BinPackParameters
 - ColumnLimit
 - BreakBeforeBraces
 - KeepEmptyLinesAtTheStartOfBlocks
2022-03-25 13:25:15 +02:00
Volker Krause
57e0119d23 Adapt to Qt6's removal of Qt::X11Extras 2022-03-16 06:45:42 +00:00
Vlad Zahorodnii
293b2244ac Move xcbutils to utils directory 2022-01-25 16:56:33 +00:00
Vlad Zahorodnii
68c675d00d Make source code more relocatable
Occasionally, I see complaints about the file organization of kwin,
which is fair enough.

This change makes the source code more relocatable by removing relative
paths from includes.

CMAKE_CURRENT_SOURCE_DIR was added to the interface include directories
of kwin library. This means that as long as you link against kwin target,
the real location of the source code of the library doesn't matter.

With autotests, things are not as convenient as with kwin target. Some
tests use cpp files from kwin core. If we move all source code in a src/
directory, they will need to be adjusted, but mostly only in build
scripts.
2021-02-10 15:31:42 +00:00
Vlad Zahorodnii
4ce853e8e4 Prettify license headers 2020-08-07 19:57:56 +00:00
Vlad Zahorodnii
1fb9f6f13a Switch to SPDX license markers
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.

In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
2020-08-07 19:57:56 +00:00
David Edmundson
a3cff85e7a Remove Qt module declarations in includes
Summary:
Test Plan: Compiles

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13359
2018-06-05 18:07:23 +01:00
Martin Gräßlin
346619aa36 Remove KWin::display from kwinglobals
Summary:
And finally nothing inside libkwineffects, libkwinglutils,
libkwinxrenderutils and kwineffect and kwin core uses KWin::display.
We are finally XLib free!

This change drops KWin::display and removes the include to QX11Info from
kwinglobals.h. And the libraries no longer need to link X11Extras.  Due
to that removal a few seeming unrelated changes are required to add the
include where needed and linkage to X11Extras.

The biggest change is to x11 platform plugin which still needs the
display and caches it in the Platform and passes it to various places in
a way that the code doesn't need to be adjusted.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3337
2016-11-16 18:00:00 +01:00
Martin Gräßlin
d345878b52 [autotests] Add Q_CONSTRUCTOR_FUNCTION to X11 specific tests to force xcb
The X11 specific tests need to run on QT_QPA_PLATFORM xcb otherwise
they will crash. To enforce this without having to replace QTEST_MAIN
a Q_CONSTRUCTOR_FUNCTION is used to invoke a function which does nothing
except setting the env variable.
2016-09-08 15:22:48 +02:00
Martin Gräßlin
66c61adb6d [autotests] Drop KWIN_TEST_MAIN macro
It was not doing anything in addition and the documentation was
completely wrong as it does the same thing as QTEST_MAIN.
2016-09-08 15:17:17 +02:00
Martin Gräßlin
0d51952d78 Provide x11Connection as a property on the KWin::Application
KWin::connection() uses the property to resolve the value instead of
using QX11Info. In practice this doesn't change anything at the moment,
but allows kwin_wayland to provide an xcb connection without depending
on QX11Info.

As we cannot make xcb_connection_t* available as a metatype, the
property's type is set to void*.
2015-03-17 09:44:53 +01:00
Martin Gräßlin
fe9873e4b1 Provide x11RootWindow as a property on the KWin::Application
KWin::rootWindow() uses the property to resolve the value instead of
using QX11Info. In practice this doesn't change anything at the moment,
but allows kwin_wayland to provide a root window without depending on
QX11Info.
2015-03-17 09:44:53 +01:00
Martin Gräßlin
1e2f491176 Improve auto-tests for xcbutils.h 2014-09-24 21:04:15 +02:00
Martin Gräßlin
04716ae5e3 [kwin] Rename tests subdirectories to autotests
Follows the naming schemes in frameworks and opens up the possibility
to include test applications for KWin in the tests subdirectory.
2014-01-30 11:01:59 +01:00
Renamed from tests/test_xcb_window.cpp (Browse further)