Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
3cdc97a4
Commit
3cdc97a4
authored
Dec 09, 2020
by
Vlad Zahorodnii
Browse files
Avoid converting socket name between QString and QByteArray back and forth
It only contributes overhead.
parent
1e2f2a28
Changes
75
Hide whitespace changes
Inline
Side-by-side
autotests/integration/activation_test.cpp
View file @
3cdc97a4
...
...
@@ -51,7 +51,7 @@ void ActivationTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
QMetaObject
::
invokeMethod
(
kwinApp
()
->
platform
(),
"setVirtualOutputs"
,
Qt
::
DirectConnection
,
Q_ARG
(
int
,
2
));
kwinApp
()
->
start
();
...
...
autotests/integration/activities_test.cpp
View file @
3cdc97a4
...
...
@@ -51,7 +51,7 @@ void ActivitiesTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
QMetaObject
::
invokeMethod
(
kwinApp
()
->
platform
(),
"setVirtualOutputs"
,
Qt
::
DirectConnection
,
Q_ARG
(
int
,
2
));
kwinApp
()
->
setUseKActivities
(
true
);
...
...
autotests/integration/dbus_interface_test.cpp
View file @
3cdc97a4
...
...
@@ -59,7 +59,7 @@ void TestDbusInterface::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
kwinApp
()
->
start
();
QVERIFY
(
applicationStartedSpy
.
wait
());
...
...
autotests/integration/debug_console_test.cpp
View file @
3cdc97a4
...
...
@@ -51,7 +51,7 @@ void DebugConsoleTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
QMetaObject
::
invokeMethod
(
kwinApp
()
->
platform
(),
"setVirtualOutputs"
,
Qt
::
DirectConnection
,
Q_ARG
(
int
,
2
));
kwinApp
()
->
start
();
...
...
autotests/integration/decoration_input_test.cpp
View file @
3cdc97a4
...
...
@@ -123,7 +123,7 @@ void DecorationInputTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
QMetaObject
::
invokeMethod
(
kwinApp
()
->
platform
(),
"setVirtualOutputs"
,
Qt
::
DirectConnection
,
Q_ARG
(
int
,
2
));
// change some options
...
...
autotests/integration/desktop_window_x11_test.cpp
View file @
3cdc97a4
...
...
@@ -46,7 +46,7 @@ void X11DesktopWindowTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
QMetaObject
::
invokeMethod
(
kwinApp
()
->
platform
(),
"setVirtualOutputs"
,
Qt
::
DirectConnection
,
Q_ARG
(
int
,
2
));
kwinApp
()
->
start
();
...
...
autotests/integration/dont_crash_aurorae_destroy_deco.cpp
View file @
3cdc97a4
...
...
@@ -46,7 +46,7 @@ void DontCrashAuroraeDestroyDecoTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
QMetaObject
::
invokeMethod
(
kwinApp
()
->
platform
(),
"setVirtualOutputs"
,
Qt
::
DirectConnection
,
Q_ARG
(
int
,
2
));
KSharedConfig
::
Ptr
config
=
KSharedConfig
::
openConfig
(
QString
(),
KConfig
::
SimpleConfig
);
...
...
autotests/integration/dont_crash_cancel_animation.cpp
View file @
3cdc97a4
...
...
@@ -46,7 +46,7 @@ void DontCrashCancelAnimationFromAnimationEndedTest::initTestCase()
qRegisterMetaType
<
KWin
::
Deleted
*>
();
qRegisterMetaType
<
KWin
::
AbstractClient
*>
();
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
kwinApp
()
->
start
();
QVERIFY
(
Compositor
::
self
());
QSignalSpy
compositorToggledSpy
(
Compositor
::
self
(),
&
Compositor
::
compositingToggled
);
...
...
autotests/integration/dont_crash_cursor_physical_size_empty.cpp
View file @
3cdc97a4
...
...
@@ -58,7 +58,7 @@ void DontCrashCursorPhysicalSizeEmpty::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
if
(
!
QStandardPaths
::
locateAll
(
QStandardPaths
::
GenericDataLocation
,
QStringLiteral
(
"icons/DMZ-White/index.theme"
)).
isEmpty
())
{
qputenv
(
"XCURSOR_THEME"
,
QByteArrayLiteral
(
"DMZ-White"
));
...
...
autotests/integration/dont_crash_empty_deco.cpp
View file @
3cdc97a4
...
...
@@ -42,7 +42,7 @@ void DontCrashEmptyDecorationTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
QMetaObject
::
invokeMethod
(
kwinApp
()
->
platform
(),
"setVirtualOutputs"
,
Qt
::
DirectConnection
,
Q_ARG
(
int
,
2
));
// this test needs to enforce OpenGL compositing to get into the crashy condition
...
...
autotests/integration/dont_crash_glxgears.cpp
View file @
3cdc97a4
...
...
@@ -36,7 +36,7 @@ void DontCrashGlxgearsTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
kwinApp
()
->
start
();
QVERIFY
(
applicationStartedSpy
.
wait
());
}
...
...
autotests/integration/dont_crash_no_border.cpp
View file @
3cdc97a4
...
...
@@ -47,7 +47,7 @@ void DontCrashNoBorder::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
QMetaObject
::
invokeMethod
(
kwinApp
()
->
platform
(),
"setVirtualOutputs"
,
Qt
::
DirectConnection
,
Q_ARG
(
int
,
2
));
KSharedConfig
::
Ptr
config
=
KSharedConfig
::
openConfig
(
QString
(),
KConfig
::
SimpleConfig
);
...
...
autotests/integration/dont_crash_reinitialize_compositor.cpp
View file @
3cdc97a4
...
...
@@ -51,7 +51,7 @@ void DontCrashReinitializeCompositorTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
QMetaObject
::
invokeMethod
(
kwinApp
()
->
platform
(),
"setVirtualOutputs"
,
Qt
::
DirectConnection
,
Q_ARG
(
int
,
2
));
auto
config
=
KSharedConfig
::
openConfig
(
QString
(),
KConfig
::
SimpleConfig
);
...
...
autotests/integration/dont_crash_useractions_menu.cpp
View file @
3cdc97a4
...
...
@@ -49,7 +49,7 @@ void TestDontCrashUseractionsMenu::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
QMetaObject
::
invokeMethod
(
kwinApp
()
->
platform
(),
"setVirtualOutputs"
,
Qt
::
DirectConnection
,
Q_ARG
(
int
,
2
));
// force style to breeze as that's the one which triggered the crash
...
...
autotests/integration/effects/desktop_switching_animation_test.cpp
View file @
3cdc97a4
...
...
@@ -48,7 +48,7 @@ void DesktopSwitchingAnimationTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
auto
config
=
KSharedConfig
::
openConfig
(
QString
(),
KConfig
::
SimpleConfig
);
KConfigGroup
plugins
(
config
,
QStringLiteral
(
"Plugins"
));
...
...
autotests/integration/effects/maximize_animation_test.cpp
View file @
3cdc97a4
...
...
@@ -47,7 +47,7 @@ void MaximizeAnimationTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
auto
config
=
KSharedConfig
::
openConfig
(
QString
(),
KConfig
::
SimpleConfig
);
KConfigGroup
plugins
(
config
,
QStringLiteral
(
"Plugins"
));
...
...
autotests/integration/effects/minimize_animation_test.cpp
View file @
3cdc97a4
...
...
@@ -50,7 +50,7 @@ void MinimizeAnimationTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
auto
config
=
KSharedConfig
::
openConfig
(
QString
(),
KConfig
::
SimpleConfig
);
KConfigGroup
plugins
(
config
,
QStringLiteral
(
"Plugins"
));
...
...
autotests/integration/effects/popup_open_close_animation_test.cpp
View file @
3cdc97a4
...
...
@@ -57,7 +57,7 @@ void PopupOpenCloseAnimationTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
auto
config
=
KSharedConfig
::
openConfig
(
QString
(),
KConfig
::
SimpleConfig
);
KConfigGroup
plugins
(
config
,
QStringLiteral
(
"Plugins"
));
...
...
autotests/integration/effects/scripted_effects_test.cpp
View file @
3cdc97a4
...
...
@@ -138,7 +138,7 @@ void ScriptedEffectsTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
ScriptedEffectLoader
loader
;
...
...
autotests/integration/effects/slidingpopups_test.cpp
View file @
3cdc97a4
...
...
@@ -55,7 +55,7 @@ void SlidingPopupsTest::initTestCase()
QSignalSpy
applicationStartedSpy
(
kwinApp
(),
&
Application
::
started
);
QVERIFY
(
applicationStartedSpy
.
isValid
());
kwinApp
()
->
platform
()
->
setInitialWindowSize
(
QSize
(
1280
,
1024
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
.
toLocal8Bit
()
));
QVERIFY
(
waylandServer
()
->
init
(
s_socketName
));
// disable all effects - we don't want to have it interact with the rendering
auto
config
=
KSharedConfig
::
openConfig
(
QString
(),
KConfig
::
SimpleConfig
);
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment