Commit Graph

522 Commits

Author SHA1 Message Date
Laurent Montel
e690c4726e Warning-- 2018-04-13 13:58:44 +02:00
l10n daemon script
a525489d5d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-20 05:19:24 +01:00
l10n daemon script
5cd23ff55f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-17 05:05:51 +01:00
l10n daemon script
e80ebab9db SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-02-25 05:27:39 +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
d14d50a668 Add more explicit 2017-12-13 07:52:10 +01:00
Montel Laurent
7f0c023d3f Use nullptr + add explicit 2017-12-13 07:36:22 +01:00
Aleix Pol
1f9b5ed657 Performance
Summary:
Remove splitting + joining of a string just to remove the beginning of a
string.
Remove double look-up.
Solves Clazy warnings

Reviewers: #frameworks, #plasma, hein

Reviewed By: #plasma, hein

Subscribers: hein, plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9109
2017-12-02 16:22:03 +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
Kai Uwe Broulik
fa3a389925 [AppletInterface] Emit change signals for configurationRequired and -Reason
Differential Revision: https://phabricator.kde.org/D9066
2017-11-30 16:51:26 +01:00
Kai Uwe Broulik
f395097fe9 [Containment Interface] Set WA_TranslucentBackground before accessing winId()
This would create the surface after which this flag has no effect causing menus to have black rounded corners.

CHANGELOG: Fixed an issue where context menus would appear with broken corners

CCBUG: 381799

Differential Revision: https://phabricator.kde.org/D8963
2017-11-24 10:40:16 +01:00
Kai Uwe Broulik
cab8fd9160 [Containment Interface] Don't add containment actions to applet actions on desktop
For a panel it makes sense to have panel options easily available on every applet
but on the desktop you typically have some free space to access the containment actions.

This is especially confusing if you have a Folder View on your Folder View desktop
and end up with a "Folder View Options" menu that affects the desktop behind it rather than the applet.

Differential Revision: https://phabricator.kde.org/D8009
2017-09-28 14:09:52 +02:00
l10n daemon script
07272a2b98 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-09-27 09:05:33 +02:00
Kai Uwe Broulik
1419135a5d Get rid of QSignalMapper
Use lambdas instead.

Differential Revision: https://phabricator.kde.org/D7361
2017-08-18 11:53:10 +02:00
l10n daemon script
24193527bf SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-08-11 04:56:36 +02:00
Kai Uwe Broulik
7e0b719f1e [Containment Interface] always emit contextualActionsAboutToShow for containment
The applet context menu contains containment actions which might be outdated if we don't call this.

Differential Revision: https://phabricator.kde.org/D6894
2017-08-02 11:02:12 +02:00
Kai Uwe Broulik
c00069c43d Use new connect syntax in more places
Especially in frequently created items. Shoves off a couple of milliseconds of startup time.

Differential Revision: https://phabricator.kde.org/D6614
2017-07-10 22:24:50 +02:00
Kai Uwe Broulik
f3dcff28b8 [Containment Interface] Keep containment in RequiresAttentionStatus while context menu is open
This ensures the panel does not auto-hide then.
It also forces a re-evaluation of auto-hide status when the menu closes,
so even if we mess up with mouse grabbing, it should more reliably auto-hide afterwards.

BUG: 344205
CCBUG: 351823

Differential Revision: https://phabricator.kde.org/D6527
2017-07-07 13:26:48 +02:00
l10n daemon script
2544d1c9c7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-06-12 05:14:10 +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
l10n daemon script
6622a8c713 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-05-24 08:46:29 +02:00
Marco Martin
5ba1bed582 set transientparent for menus
Summary:
set transient parent for popup menus created by appletinterface/
containmentinterface, it makes them appear at the proper coordinates

Test Plan: containment menus appear where the mouse was pressed

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D5918
2017-05-22 10:51:16 +02:00
David Edmundson
29f1ee3858 Update the ungrabMouse hack for Qt 5.8
Summary:
There was an unidentified bug where when opening a context menu in
response to a mousePress event led to the next click events not being
registered. The mouse got grabbed by the item in the mousePressEvent,
but when we open a menu it didn't get released. The next click goes to
the currently grabbed item.

A workaround was added back in 2015 (and copied into various other parts
of Plasma) to ungrab the mouse after launching the context menu inside
our rightClickEvent. This doesn't work because qquickwindow code is
shuffled. It now sends the event and then grabs the mouse.

qquickwindow.cpp:653 on Qt5.8.0

Which means we're now trying to do the ungrab, before QWindow has set
our item as the grabber. That obviously doesn't work.

This real bug needs fixing in Qt, (I now know the root cause!)
but we have a workaround here already, we may as well make it work.

FWIW, the root cause of all of these bugs is:
The way it should work is:
    QQuickItem is pressed
    QtQuick internally says "this item has the mouse"
    you release the mouse, that gets reset
    you change window focus, that gets reset

In our case, we don't get either of the last two because:

We spawn a QMenu on mousePress; this takes focus and more importantly
does a mouse grab (a different type. At an X level, not in QtQuick) so
our QQuickWindow never gets a mouseReleaseEvent

Test Plan:
Had 1 reproducible case
Added this. No longer could reproduce

Reviewers: #plasma

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D5515
2017-04-24 16:06:51 +01:00
David Edmundson
1387b5efe3 Guard against Applet not loading AppletInterface
Summary:
This can happen if an applet has invalid metadata, it doesn't have a
script engine set (X-Plasma-API) so it won't load the DeclarativeAppletScripts
Having invalid metadata could come from the applet, or from the fallback applet
created in Containment::Private::createApplet.

We guard against it in appletAdded but not in appletRemoved, which is
inconsistent. We also apparently must have guards elsewhere otherwise
we'd see the crash more.

BUG: 377050

Test Plan: Had corrupt applet, used to crash, now doesn't

Reviewers: #plasma

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D5423
2017-04-13 10:49:10 +01:00
Marco Martin
244baaf928 add a new property in containment, for an edit mode
Summary:
used for opening the handles when the toolbox is open
or potentially other places

Test Plan: handles open

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D5153
2017-03-23 15:23:06 +01:00
Kai Uwe Broulik
ff78b9e531 Add KAcceleratorManager
This way containment context menus and PlasmaComponents Menu get accelerators assigned to by default.

CHANGELOG: Most (context) menus have accelerators (Alt+letter shortcuts) now

BUG: 361915

Differential Revision: https://phabricator.kde.org/D5057
2017-03-16 11:47:59 +01:00
Kai Uwe Broulik
fe3fd0cf17 Forward keyPressEvent to super class
Otherwise things like KRunner while typing on empty desktop breaks

Thanks Fabian Vogt for noticing
2017-03-07 16:56:58 +01:00
Kai Uwe Broulik
94a6a168cf [Containment Interface] Trigger context menus on pressing "Menu" key
When pressing the "Menu" key, pretend a right-click happened and show the containment context menu.

Differential Revision: https://phabricator.kde.org/D4924
2017-03-06 15:14:15 +01:00
Aleix Pol
3a9fc22724 Small cleanups
Summary: Move implementation to cpp file, port away from deprecated API.

Reviewers: #frameworks, #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4931
2017-03-06 00:07:52 +01:00
Allen Winter
c4b01b0155 qml/plasmoid/containmentinterface.cpp - fix compile with Qt5.6 2017-02-20 11:36:55 -05:00
Marco Martin
f684e6b2e0 [WIP]: integrate drop menu and filecopy drop menu
Summary:
add an optional menu parameter to processMimeData to mnually pass
an existing qmenu. folderview can use that to pass its own
filecopyjob drop qmenu to be populated with extra entries

Test Plan:
dropping a file on folderview will show a menu with
entries from both.
works both with folderview and desktop containments

Reviewers: #plasma, hein

Reviewed By: #plasma, hein

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4576

Change-Id: Iae911d4e692f2e591358959758ca6ddd131379c0
2017-02-20 11:23:18 +01:00
Kai Uwe Broulik
1b02bfdff7 [ContainmentInterface] Also align containment context menu to panel
There's no point in only aligning applet context menus to the panel.

Differential Revision: https://phabricator.kde.org/D4453
2017-02-06 12:31:30 +01:00
l10n daemon script
bba40b9b9d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-05 06:07:10 +01:00
Kai Uwe Broulik
031bd773b7 [ContainmentInterface] Use setSize instead of setWidth/setHeight in createApplet
This avoids needless binding updates and expensive layouting.

Differential Revision: https://phabricator.kde.org/D4352
2017-01-30 16:16:40 +01:00
Kai Uwe Broulik
fe39905560 [Containment Interface] No need for values() as contains() looks up keys
Avoids creating a temporary list for no reason.
Also use value() which is always const compared to operator[]

Differential Revision: https://phabricator.kde.org/D4348
2017-01-30 15:07:30 +01:00
l10n daemon script
68f1a87c67 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-01-28 06:33:42 +01:00
Eike Hein
2c69d22546 Add missing screenGeometryChanged signal; use in AppletInterface; fix typos.
Reviewed-by: Marco Martin

BUG:373075
2017-01-19 03:43:49 +09:00
Kevin Funk
f8a7b418d5 Prefer nullptr over Q_NULLPTR 2017-01-16 18:17:34 +01:00
Kai Uwe Broulik
a0f3d2429d Fix X-Plasma-Drop* types
They are supposed to be lists. This fixes dropping folders on desktops to create a FolderView.
Dropping trash:/ also offers to create a trash applet again.

BUG: 374418

Differential Revision: https://phabricator.kde.org/D3902
2017-01-03 09:31:21 +01:00
l10n daemon script
9581ada651 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-23 05:42:04 +01:00
l10n daemon script
2f4e59e902 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-22 05:52:51 +01:00
David Edmundson
7e1f2d79da Don't double emit iconChanged
Summary:
AppletInterface::setIcon calls Applet::setIcon which in turn emits
Applet::iconChanged

Applet::iconChanged is already connected to
AppletInterface::iconChanged

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3761
2016-12-20 13:26:10 +00:00
David Edmundson
17f5a3073b Emit toolTipMainTextChanged if it changes in response to a title change
Summary:
The fallback for toolTipMainText is showing the applet title.

When the applet title changes, it may result in a change of
toolTipMainText.

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3760
2016-12-20 13:26:10 +00:00
David Edmundson
63a889ea0d Don't double emit titleChanged
Summary:
AppletInterface::setTitle calls Applet::setTitle -- which in turn emits
Applet::titleChanged

Applet::titleChanged is already connected to
AppletInterface::titleChanged

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3759
2016-12-20 13:26:10 +00:00
l10n daemon script
793441b77b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-20 12:53:44 +01:00
Kai Uwe Broulik
a195a6b0b3 [AppletInterface] Never pull focus away from fullRepresentation
When closing the launcher using Meta key, it pulls focus away and when
clicking the button to expand the applet, it won't get focus again.

BUG: 372476
REVIEW: 129404
2016-11-15 10:31:03 +01:00
Marco Martin
07ae9bbc46 set context proeprties before reloading the qml
doing setSource then immediately after rootContext()->setContextProperty
makes the property binding evaluated right at startup to be broken,
also fail any access to said contextproperty until the point of
Conponent.onCompleted

BUG:371763
Change-Id: Ie10afcf3c5b1693db49b5c240c9d2a4f3c47db21
2016-10-31 14:45:37 +01:00
Aleix Pol
6d47160367 Don't reparse the metadata file if it's already loaded
By doing so, we don't tie ourselves to the desktop format as well as we
leverage cached data.
Expose Plasma::Package::kPackage

REVIEW: 129278
2016-10-31 12:04:06 +01:00
Roman Gilg
65706d3878 New bool to use activated signal as toggle of expanded
The launcher applets couldn't be closed with Meta alone and on Wayland
in general by any global shortcut, since we used for that the focusOutEvent
triggered only on X and only on global shortcuts (on default Alt+F1).

This patch introduces the new bool activationTogglesExpanded, which allowes
QML applets to decide if they wish to use the activated signal also to end
their expanded state.

The default value is false, in order to not break any legacy applets.

REVIEW: 129204
BUG: 367685
2016-10-19 18:51:15 +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