Commit Graph

504 Commits

Author SHA1 Message Date
6ef24fd90e fix xmonad regression 2021-07-26 12:25:03 +02:00
Christophe Giboudeaux
1587ead53e Fix typos found by codespell
GIT_SILENT
2021-07-14 11:01:00 +02:00
David Edmundson
815ddd3fc3 Port from QExposeEvent::region
This gets deprecated in Qt6.

See also https://codereview.qt-project.org/c/qt/qtwayland/+/349335
2021-07-09 14:35:21 +00:00
Friedrich W. H. Kossebau
2c23dc0123 Use more target-centric cmake code
NO_CHANGELOG
2021-07-06 13:58:19 +02:00
Nicolas Fella
0889def484 Remove call to setClearBeforeRendering
It's on by default and the method is gone in Qt6
2021-06-01 09:29:29 +00:00
Alexander Lohnau
5dfa851f7b
Allow building the project without deprecations 2021-05-18 06:20:10 +02:00
Friedrich W. H. Kossebau
fb9f3703a7 Port away from ECMSetupVersion's deprecated *_VERSION_STRING CMake variable
NO_CHANGELOG
2021-05-02 20:32:27 +02:00
Vlad Zahorodnii
629f4421a7 Port Plasma::Dialog to QWindow-based effects API
The WId-based KWindowEffects API is deprecated.
2021-04-28 06:08:19 +00:00
Nicolas Fella
6215355f28 Remove unneeded KIO linkage 2021-04-27 22:07:15 +02:00
Kevin Ottens
799121e70b [Wayland] Ensure pinned popup end up on the panel layer
The pinned popups need to act as a "panel extension". Easiest way to
achieve this on Wayland is to just make sure they end up on the panel
layer. This is simply done by changing the role on their corresponding
surface so that KWin treat them properly (as in like a panel but with
windows able to go under).

Neat way of doing it like this is that it will work wherever the popup
parent is coming from (a panel or the desktop).

BUG: 400317
2021-04-22 14:02:27 +02:00
Ahmad Samir
2ff586d513 Tweak formatting after running clang-format
NO_CHANGELOG
2021-03-13 17:35:34 +00:00
Ahmad Samir
c0274df69a Run clang-format on all cpp/h files
NO_CHANGELOG
2021-03-13 17:35:34 +00:00
Ahmad Samir
9ae7d71b9a Add a trailing comma to enum
Should help produce better diffs and clang-format won't squash the enum
on one line.

GIT_SILENT
2021-03-13 17:35:34 +00:00
Niccolò Venerandi
4d4db0b199 Use adaptive transparency and tweak contrast effect to make better use of it 2021-03-01 22:25:52 +00:00
Aleix Pol
f33d8b795f Print which file is responsible for an error
Makes it easier to debug issues.
2021-02-24 15:51:04 +01:00
Nicolas Fella
08f0204d16 Replace KF5_VERSION with KF_VERSION
Frameworks will be Frameworks 6 at some point and there is no good reason to have the major version in the variable name.

Given this is purely internal we can to this now, making it a bit more future-proof

GIT_SILENT

NO_CHANGELOG
2021-01-29 23:25:42 +01:00
Friedrich W. H. Kossebau
47f01a434b Use non-deprecated KDEInstallDirs variables also for CMake config generation
NO_CHANGELOG
2021-01-29 05:31:27 +01:00
Ahmad Samir
34a8b79aa7 Use Q_EMIT instead of emit
In C++20 there are new classes that have member functions named emit().
c.f.:
https://lists.qt-project.org/pipermail/development/2020-February/038812.html
https://en.cppreference.com/w/cpp/io/basic_osyncstream/emit

GIT_SILENT
2021-01-18 13:08:40 +02:00
Jan Blackquill
108939c420 Dump plasmoid errors into console
For some reason, we weren't putting plasmoid loading errors into the console, which interfered with debuggability of errors. Dumping them is useful for debugging.
2021-01-15 15:38:34 -05:00
Jan Blackquill
f3bab49d03 Expose error information to error plasmoid in a more structured manner 2021-01-02 02:05:53 +00:00
Albert Astals Cid
ec41734969 Remove ifdefs, we require Qt 5.14 now 2020-12-18 21:46:01 +01:00
Marco Martin
f09b46bec6 Draft: Replace QString cache IDs with a struct-based version
As it turns out, QString::number() is quite expensive, especially when
using it in a code path that is called a lot of times. So instead, use a
struct with a custom hash method as cache ID. This is significantly
faster since we do not need to do memory allocations or string
conversions.
2020-12-17 11:31:27 +00:00
Marco Martin
0e973e852f Add a Representation component
Add a Page-derived component intended as a root
for full representations.
It may go over the plasmoid edges (both on desktop and popups)
with the properties applyHorizontalPadding and applyVerticalPadding.
When the contentItem is a ScrollView or a Scrollarea,
the plasmoid margins will be automatically removed.
2020-12-02 14:05:29 +00:00
Mikel Johnson
3b11e75462 Revert "[Dialog] Make BackgroundHints a flag and add DiscardBackgroundMargins"
This reverts commit 4079eaae0e
2020-11-20 15:21:23 +00:00
Mikel Johnson
d56ca431c2 Revert "[Dialog] Don't apply margins with DiscardBackgroundMargins instead of reverse"
This reverts commit 4f80d91ceb
2020-11-20 15:21:06 +00:00
Mikel Johnson
717e2ab7b0 Revert "[Dialog] Evaluate margins when BackgroundHints change"
This reverts commit 1367c5d3f6
2020-11-20 15:20:36 +00:00
Mikel Johnson
1367c5d3f6 [Dialog] Evaluate margins when BackgroundHints change 2020-11-19 18:45:27 +00:00
Mikel Johnson
4f80d91ceb [Dialog] Don't apply margins with DiscardBackgroundMargins instead of reverse 2020-11-19 17:31:51 +00:00
Mikel Johnson
4079eaae0e [Dialog] Make BackgroundHints a flag and add DiscardBackgroundMargins 2020-11-19 16:23:00 +03:00
Laurent Montel
e2c16864c8 If include is define in .h remove it if it's defined in .cpp too (scripted) 2020-10-23 08:39:01 +02:00
Aleix Pol
c3259fc2df Solve some clazy warnings
My last patch triggered me to run clazy on the project. This patch
solves some of them:
- Proper iteration of some types, saving their copy.
- compile-time connects
- prefer using connects with the 3rd argument as an object when using
lambdas.
2020-10-22 11:12:32 +00:00
Friedrich W. H. Kossebau
d1617d6d2d Port away from deprecated KDeclarative::setupContext()
NO_CHANGELOG
2020-10-07 16:26:31 +00:00
Alexander Lohnau
d6a5b10b3b Toggle plasmoids when shortcut is activated
BUG: 400278
FIXED-IN: 5.76

Now the plasmoids are toggled by default. The system tray is a
special case, which needs to be in plasma-workspace adjusted.
2020-10-07 16:18:35 +00:00
Andreas Cord-Landwehr
d10afb5d2a plasma-framework: Convert copyright statements to SPDX expressions 2020-08-13 19:08:54 +00:00
Niccolò Venerandi
3caaaae585 Set type to Dialog in flags if type is Dialog::Normal 2020-08-02 10:24:36 +00:00
Nate Graham
a707731607 Don't show Plasma dialogs in task switchers
Plasma dialogs are already marked as not being shown in the task manager
and the pager. We should similarly omit them from the task switcher, for
the same reasons.

BUG: 419239
FIXED-IN: 5.73
2020-07-16 20:18:30 -06:00
Friedrich W. H. Kossebau
2ce6774718 Use KF-standardized Qt logging categories
See https://community.kde.org/Frameworks/Frameworks_Logging_Policy
2020-07-13 03:16:11 +02:00
Laurent Montel
e45a66139a Use camelcase include. (scripted) 2020-07-08 07:44:43 +02:00
Nate Graham
1ead97e8c9 Show clearer warning if the requested KCM could not be found
In particular, make it clear that we only support QML KCMs.
2020-07-03 04:45:10 +00:00
Vlad Zahorodnii
4ddf0d9944 [Dialog Shadows] Port to KWindowSystem shadows API
Summary: BUG: 416640

Test Plan: Run `qmlscene tests/dialog.qml`

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T12496

Differential Revision: https://phabricator.kde.org/D26503
2020-06-11 13:18:40 +03:00
Ahmad Samir
e63b2092d0 [PackageUrlInterceptor] Minor code optimisation
This gets rid of QRegularExpression and uses plain string operations,
which is always a faster route.
2020-05-22 12:44:42 +00:00
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
David Edmundson
0417bf61d5 [configview] Simplify code / workaround Qt5.15 crash
Summary:
QQmlComponent::beginCreate and completeCreate are useful if you need to
set properties on the object explicitly. We're not doing that here, we
can just call create.

Test Plan:
On Qt5.15
Right click a panel
choose edit

Reviewers: #plasma, apol

Reviewed By: apol

Subscribers: apol, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D28599
2020-04-06 12:30:51 +01:00
Daniel Vrátil
b6213cdd59
Dialog: disconnect from QWindow signals in destructor
Summary:
When Dialog is being destroyed, its QWindow super-class may still emit
some signals from its destructor. Dialog is connected so some of them,
so this leads to Qt invoking slots on Dialog, whose destructor has
already been called, leading to crashes.

This patch disconnects all internal connections in Dialog's destructor.

See https://phabricator.kde.org/D23339 for details.

Test Plan: Plasma no longer crashes when a notification appears

Reviewers: #plasma, nicolasfella, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27671
2020-02-26 10:00:45 +01:00
Daniel Vrátil
1e11099c16
Fix initialization order
Reviewers: #plasma, #frameworks, apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27627
2020-02-25 14:32:06 +01:00
Daniel Vrátil
4b93b71a49
Fix memory leak in ConfigView and Dialog
Reviewers: #plasma, #frameworks, apol, davidedmundson

Reviewed By: apol, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D23339
2020-02-25 14:31:28 +01:00
Friedrich W. H. Kossebau
2e3cc7e8dd Use ecm_qt_install_logging_categories over manual categories file 2020-02-12 04:09:12 +01:00
Vlad Zahorodnii
f5f43514af [Plasma Quick] Add WaylandIntegration class
Summary: It allows us to get rid of DialogShadows::waylandPlasmaShellInterface().

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T12496

Differential Revision: https://phabricator.kde.org/D26491
2020-01-22 02:42:02 +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
David Edmundson
d25bc3ce21 Sync QWindow flag WindowDoesNotAcceptFocus to wayland plasmashell interface
Summary:
Currently the widget explorer relied on some QML code calling
KWindowSystem::forceActiveWindow which on plasma implicitly set this
hint.

This works for the first show, but the order of events is somewhat
unreliable. It's invoked from QML when the window is ready, but for the
second show this is before the wl_surface is created and it no-ops.

By syncing the flags in applyType() we can guarantee we call this both
when setFlags is called and when the wl_surface is created in the
correct order.

BUG: 415124
BUG: 401172

Test Plan:
Ran plasmashell
Opened widget explorer twice
Had focus each time

Reviewers: #kwin, #plasma, romangg

Reviewed By: #kwin, #plasma, romangg

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26153
2019-12-22 12:37:04 +01:00