Commit Graph

190 Commits

Author SHA1 Message Date
Laurent Montel
48f60533b9 [plasma-framework] make it compiles without foreach
Summary: compile without foreach

Test Plan: autotest ok

Reviewers: dfaure, apol

Reviewed By: dfaure, apol

Subscribers: ahmadsamir, nicolasfella, broulik, apol, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D19913
2020-04-17 06:47:04 +02:00
Laurent Montel
b387faa935 Port qrand to QRandomGenerator (qrand is deprecated in qt5.15)
Summary: Port to QRandomGenerator

Reviewers: apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26464
2020-01-07 06:47:10 +01:00
Laurent Montel
29f2171813 GIT_SILENT: remove <QtTest> which includes all of <QtCore> (scripted) 2019-12-14 16:58:05 +01:00
Yuri Chornoivan
052a81f755 Fix minor issues found by EBN and typos 2019-11-10 12:06:10 +02:00
Aleix Pol
ea88d2aa51 Skip test on wayland
Summary: It's using some API that isn't available

Test Plan: Noise gone

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D23587
2019-08-30 18:06:45 +02:00
David Edmundson
17d49c0bce Handle colors file in fake plasma theme installer 2019-07-25 00:15:30 +01:00
David Edmundson
08a6a4a7cd Install plasma theme into local XDG_DATA_DIR for icon test
Summary: Relevant code is moved from dialognativetest into a header for sharing

Test Plan: Unit test

Reviewers: #plasma

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D22732
2019-07-24 23:53:39 +01:00
Aleix Pol
72ff860ef0 Fix running the dialognativetest without installing
Reviewed by David Edmundson
2019-07-23 19:38:23 +02:00
David Edmundson
0e14ab6eca Remove deprecated tests
Summary:
Plasma::KPackage is deprecated in favour of KPackage.
There are much better tests there.

Storage is completely unused, no point testing it.

Test Plan: Compiles

Reviewers: #plasma

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D22611
2019-07-21 16:11:37 +02:00
David Faure
89724dbd8c autotests: don't fail if an unrelated window shows up.
Summary:
Running anything else in parallel to this test would make it fail,
because windowAdded() would be emitted with an unrelated window.
If we couldn't find our dialog when the signal is emitted,
just keep waiting for the signal to be emitted again.

Test Plan: ctest -j 8 .

Reviewers: hein, drosca, broulik, davidedmundson, jtamate

Reviewed By: jtamate

Subscribers: jtamate, kde-frameworks-devel, #plasma

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D14724
2019-04-01 09:48:22 +02:00
Laurent Montel
9fc663d9f0 Make it compiles without deprecated method
Summary: compile without deprecated method

Test Plan: all autotest ok

Reviewers: dfaure, apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D19418
2019-02-28 23:01:43 +01:00
Friedrich W. H. Kossebau
fcfc201c8d Use more https in links (& update a few urls)
GIT_SILENT
2019-01-19 16:36:59 +01:00
Kai Uwe Broulik
38098e96e3 Remove ComponentInstaller
When a dataengine failed to load it would ask PackageKit to install it but it's generally not how we want to distribute
plasmoid infrastructure these days and didn't work.

Differential Revision: https://phabricator.kde.org/D16301
2018-11-19 12:53:31 +01:00
Laurent Montel
cbd5abf787 Remove qt include prefixx 2018-11-06 07:23:52 +01:00
Yuri Chornoivan
72ca2f79e0 Fix minor EBN issues and typos 2018-10-22 21:05:29 +03:00
Kai Uwe Broulik
e92ed94d9d Remove PLASMA_NO_KIO option
It is a remnant of the Plasma Active days and didn't even compile.
This patch only removes those ifdefs, it doesn't fix any issues I found during (e.g. double lookups or the fact
that KRun::autoDelete is the default now)

Differential Revision: https://phabricator.kde.org/D16295
2018-10-18 16:44:27 +02:00
Friedrich W. H. Kossebau
30cbc2dc33 Use more nullptr 2018-07-02 00:16:21 +02:00
Laurent Montel
70a274ad3a Use override 2018-05-23 08:05:40 +02:00
Kai Uwe Broulik
639e8684e3 [Icon Item] Treat sources starting with a slash as local file
We have a special case for sources starting with "file://" but a "/" also represents an absolute path and shouldn't
conflict with icon theme names.
Kicker sets a custom image as local path and then we would end up trying to load it as a QIcon::fromTheme eventually.
This will cause the implicit size of the icon item to stay at its default as we only check a custom implicit size
for a source QImage or an SVG. Moreover, this potentially introduces scaling artefacts.

Differential Revision: https://phabricator.kde.org/D9812
2018-01-15 10:22:18 +01:00
Marco Martin
c318fde313 make packageurlinterceptor as noop as possible
Summary:
minimize file access during url rewrite

we still need it for accessing stuff under code/

Test Plan: plasma still loads, seems to save ~2%

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, ngraham, apol, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9124
2017-12-18 13:00:31 +01:00
Montel Laurent
7f0c023d3f Use nullptr + add explicit 2017-12-13 07:36:22 +01:00
Montel Laurent
dfac32f0e4 test return value from QTest::qWaitForWindowExposed 2017-12-06 08:17:42 +01:00
Aleix Pol
b8b8a69fd1 Remove implicit string casting
Summary: Follow the KF5 guidelines

Test Plan: Plasma shell starts

Reviewers: #plasma, #frameworks, sebas

Reviewed By: #plasma, sebas

Subscribers: plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9108
2017-12-02 15:44:14 +01:00
Montel Laurent
5d9aa6816f We depend against 5.7 2017-11-29 21:10:48 +01:00
Luca Beltrame
cf79873de6 Revert "Don't list KF5::WindowSystem in public libraries"
PlasmaQuick::Dialog::WindowType uses KWindowSystem's API, so removing
it from the list of the public libraries causes compilation issues in
projects that depend on plasma-framework (such as plasma-desktop) which
no longer find KWindowSystem's includes.

This reverts commit f8de13c674.

CCMAIL: kde@davidedmundson.co.uk
2017-07-05 09:18:49 +02:00
David Edmundson
f8de13c674 Don't list KF5::WindowSystem in public libraries
Summary: We don't use it in public API

Reviewers: #plasma

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D6495
2017-07-04 07:57:08 +01:00
Pino Toscano
0c8cac7849 tests: run i18ndcheck only when bash is found
it's a bash script, so it is pointless to attempt to start it when bash
is not installed
2017-06-06 16:09:25 +02:00
Aleix Pol
563011436d Port a bunch of classes away from Plasma::Package
Summary: Ported away some classes, removes many unneeded casts that happen when starting.

Test Plan: Tests still pass, plasma starts properly

Reviewers: #frameworks, #plasma, mart

Reviewed By: #plasma, mart

Subscribers: davidedmundson, mart, plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D6041
2017-06-06 15:11:25 +02:00
Pino Toscano
8b92058d97 cmake: use ecm_add_test more
avoid manually adding tests when possible
2017-06-06 14:45:10 +02:00
Pino Toscano
028d7fec2a tests: fix i18ndcheck.sh for paths with special chars
- quote the argument, so it is interpreted as single parameter (as it
  should be)
- print the found paths with null terminator, telling xargs to read
  them that way
2017-05-06 15:01:27 +02:00
Christophe Giboudeaux
500d84d2bc Fix build with CMake 3.8 2017-04-27 19:09:18 +02:00
David Rosca
af2b27d1b8 IconItem: Add roundToIconSize property
Disabling this property makes it possible to show icon of arbitrary size.

Differential Revision: https://phabricator.kde.org/D4689
2017-02-28 11:18:17 +01:00
David Rosca
148ff6311b IconItemTest: Fix loadPixmap and loadImage tests
It only works on CI because data/test_image.png size
is the same as implicitSize of IconItem (KIconLoader::Dialog).

Differential Revision: https://phabricator.kde.org/D4702
2017-02-21 12:04:41 +01:00
Marco Martin
d8a1a9eb08 don't regenerate frames when setting every property
Summary:
give frameSvg the concept of repaintBlocked(), that enables and
disables the regeneration of the frame data when a property is set.
the use case is when often, a lot of properties are set one after
the other (such as prefix, enabled borders, size)
collapse the formely similar, but a bit different logic of frame
regeneration is a single function for better maintanability.
QML FrameSvgItem sets repaintblocked when it starts and releases it just on oncomponentCompleted

Test Plan:
plasmashell still starts, autotests still work, all frames are rendered correctly
the destruction of old frames is cutted by 50%. in the qml profiler
the creation time of a framesvgitem slightly improved, on this machine from around 26 msecs to around 21, can still be improved, but at least the code is a bit simpler

Reviewers: #plasma

Subscribers: davidedmundson, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4414
2017-02-07 13:08:27 +01:00
Kai Uwe Broulik
8875a04a1b [Icon Item] Fix updating implicit size when icon sizes change
The old code was connecting the KIconLoader signal to implicitWidth/HeightChanged
but never actually set a new implicit size.
Also, while at it use "setImplicitSize" - it's also marked internal but public
like setSize and uses qreal instead of QSizeF.

Differential Revision: https://phabricator.kde.org/D4011
2017-01-08 16:16:59 +01:00
Kai Uwe Broulik
d46a91ea57 [Icon Item] Support non-square icons
BUG: 355592

Differential Revision: https://phabricator.kde.org/D3892
2017-01-05 15:15:14 +01:00
Michail Vourlakos
6aedda94b2 Fix #374127 misplacement of popups from dock wins
--the dialogs shown from dock type windows when
the dock uses masking are placed far from the
the element that triggered them. This patch
fixes this bug and provide also an auto test.
2016-12-30 01:07:43 +02:00
Eike Hein
91eb0749ed Revert "port all output to QCDebug/QCWarning"
This reverts commit acd7ab7815.

This broke the build for me and on CI:
/home/jenkins/sources/plasma-framework/kf5-qt5/src/declarativeimports/core/datamodel.cpp:214:9:
error: 'LOG_PLASMACORE' was not declared in this scope

CCMAIL:notmart@gmail.com
2016-10-19 03:16:16 +09:00
Marco Martin
acd7ab7815 port all output to QCDebug/QCWarning
port every terminal output to appropriate QCdebug/QCwarning,
each different binary has its own logging category now, so
it's possible to enable/disable them selectively.
this should also make plasmashell a bit more quiet on
terminal by default

Change-Id: Ic0b26364f988935e990c6988f8f9375b7c9bf838
REVIEW:129210
2016-10-17 18:18:04 +02:00
David Faure
8abeceaffd Skip autotest that is broken with Qt 5.5
Eike Hein said this was fixed by David Rosca in Qt >= 5.6.1.

CCMAIL: plasma-devel@kde.org
2016-08-07 13:25:07 +02:00
Martin Gräßlin
9814aff6b9 [autotest] Extend ThemeTest with a case for compositing changes
The added test case simulates that a Compositor is started on X11
and shut down again. This should trigger the themeChanged signals
and the imagePath should return different elements.

REVIEW: 128572
2016-08-03 11:28:23 +02:00
Eike Hein
2c6dacea38 Fix the infamous 'dialogs show up on the Task Manager' bug once more.
- Initially set state (and type, and flags) in response to PlatformSurfaceCreated.
  We know reliably this will run before the window is mapped.

- Drop the comment about removing setState() form showEvent handler, as
  we need it to avoid state loss in this scenario:
  <mgraesslin> the window gets mapped first time: everything is fine
  <mgraesslin> window gets unmapped: kwin removes the state as per spec
  <mgraesslin> qt gets change event and removes the states it doesn't care about
  <mgraesslin> qt maps window again and sets states
  <mgraesslin> we lost the state
  <mgraesslin> which means we need to set the state again from our side before(!) Qt sets it
  <mgraesslin> and before Qt maps the window
2016-07-15 19:40:37 +09:00
David Rosca
80dcba46b5 IconItemTest: Set plasma theme to default rather than skipping tests if not default
Default plasma theme is installed with plasma-framework, so there
shouldn't be reason to skip tests.

REVIEW: 128408
2016-07-12 10:01:29 +02:00
Marco Martin
8919e11c6e fix test
sync the cache id generation to be in sync of the one
used internally in Svg
2016-06-01 10:58:43 +02:00
Marco Martin
1d81c83779 disable the tests when no plugins are installed
this test relies on plugins installed from plasma-workspace
so it can't reliably work on CI, it has to be run from
the desktop.
in the end it will have proably to install in this case one dummy
plugin per type
2016-05-20 12:16:21 +02:00
Anthony Fieroni
2275db4b39 [dataengine]If the DataEngine constructor is called with an invalid KPluginInfo object, make sure valid is set to false.
+ test case

REVIEW: 127795

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2016-05-19 22:45:29 +03:00
Harald Sitter
6ad988cb3d force icon themes explicitly via new testing helper function
REVIEW: 127954
2016-05-18 13:50:11 +02:00
Marco Martin
5405a97a70 add some more tests to debug what's going wrong
test on ci is failing atm, add some more tests to debug
what's going wrong there

Change-Id: I963e01263e7bd2399eacc7773968423f95decfe3
2016-05-16 12:48:35 +02:00
Marco Martin
f0c119696d highlight/highlightedText from proper color group
lately the highlight color of plasma became a very
washed-out blue, (since it switched to use the
global system colors) that was because it actually
taken the highlight color (and highlightedText)
from the wrong source.
there is a correct color group in kcolorscheme for
that, that is Selection, take those two colors
from that (also means highlight and highlightedtext
always be the same in all plasma::theme::colorgroups
but that's not a problem)

update test to reflect that

REVIEW:127842
2016-05-05 12:22:44 +02:00
David Rosca
f336f80039 ConfigModel: Don't try to resolve empty source path from package
ConfigModel may contain ConfigCategory for both QML pages and KCM pages.
The source property will be empty for KCM pages.  This fixes correctly
returning empty source for KCM pages.
Also return the same value from get().

REVIEW: 127702
2016-05-04 17:34:02 +02:00