Commit Graph

182 Commits

Author SHA1 Message Date
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
Harald Sitter
c9e8c4b38c warn about need for production data, skip tests that depend on them
numerous icon tests expect the actual production plasma theme to be present
it won't however be resolved because we disable qstandardpaths' default
fallbacks by switching it into testing mode. this ultimately means the
test run needs to have XDG_DATA_DIRS in the environment, if it doesn't
test data will not be present

furthermore QSKIP tests that depend on:
- hicolor icon theme to be present
- production plasma themes

this allows the entire test to pass in less than optimal environments by
means of skipping but also gives a reasonable hint as to why tests are
skipped in the first place. also moving forward if a test isn't guarded
we still have the warning about failure potential allowing someone to
quickly figure out why things failed

REVIEW: 127764
2016-04-27 15:29:54 +02:00
Harald Sitter
e8d09dd42b add missing include 2016-04-27 13:37:45 +02:00
Harald Sitter
0a45d9792d reload icon theme for iconitemtest as well 2016-04-27 13:34:43 +02:00
Harald Sitter
94943e21e8 sync the config so reparsing works 2016-04-27 13:33:52 +02:00
Harald Sitter
e54d75fb80 reload icon theme properly
- reparse the global config (needed because the curren theme cache is
  refreshed from there)
- reconfigure the global curren-theme cache
- reconfigure the global loader

reviewed on IRC
2016-04-27 13:25:59 +02:00
Marco Martin
1cf145861b add Positive, Neutral, Negative text colors
add named colors for positive (usually green)
neutral(usually yellow) negative(usually red)
foreground objects, such as text or parts of
svg icons/themes

REVIEW:127696
Change-Id: I646306339f1684cdc062da3d3af1489af6092372
2016-04-20 18:25:50 +02:00
Marco Martin
553a9bfe53 bind highlightedText color in Plasma::Theme
we have a color in the Plasma theme "highlight" that is basically
an accent color used around.. but one of the uses is to use it as
a background, such as highlighted text. in that case we don't know
what color would be safe for contrasting on top of it for things
like the highlighted text color (plasma style used the background
color for that, which is incorrect)

REVIEW:127637
2016-04-13 12:28:53 +02:00
Marco Martin
944c7e60dc cache svg icons from icon theme
cache as well svg icons from the icon theme
(invalidating as well when the icon theme is updated)

REVIEW:127260
2016-04-04 17:47:30 +02:00