Summary:
If the host of a kjob crashes or is killed kuiserver currently reports
that the job has been completed successfully. This is seriously wrong as
it could lead a user to perform a potentially destructive operation.
Setting any error (that's not 0 or 1) will cause plasmashell, the main
kuiserver view, to show a persistent notification that a job has failed.
For master I will use a more correct new enum, new error text, and a way
to tell for KIO operations to report to the uiserver if the host
crashing is important or not.
CCBUG: 352761
Test Plan:
Whilst copying a million files killed dolphin
Got a persistent error instead of a success message on the last file it was on
Moving files successfully then killing the app remained fine
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D17171
Summary:
--as @mart requested we can rename "menuHidden" property
to "visible" in order to follow Qt naming
Test Plan:
--check that global menu applet is functioning the same
way as when using removed menuHidden property
Reviewers: #plasma, mart, davidedmundson
Reviewed By: #plasma, mart
Subscribers: mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D17107
Summary:
--a new screenGeometry property is added in the
AppMenuModel in order to be used for filtering
windows based on their geometry.
BUG: 384895, 395853
Test Plan:
--validate that when moving a window between different screens the global menu applet is updated accordingly
--checkout that nothing has broke because of this new behavior
Reviewers: #plasma, broulik, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: mart, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16768
Summary:
SystemTray::serviceRegistered is called tons of times; the regexp
construction inside the for-loop is expensive and should be avoided.
Thus construct the regexp once, and re-use the regexp object each time.
Test Plan:
Before:
{F6432674}
After:
{F6432675}
Reviewers: davidedmundson
Reviewed By: davidedmundson
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D17025
Trace:
Direct leak of 24 byte(s) in 3 object(s) allocated from:
#0 0x544cc0 in operator new(unsigned long) (/home/kfunk/devel/install/kf5/bin/plasmashell+0x544cc0)
#1 0x7fe4f0e82df9 in TaskManager::XWindowTasksModel::Private::windowInfo(unsigned long long) /home/kfunk/devel/src/kf5/plasma-workspace/libtaskmanager/xwindowtasksmodel.cpp:419:25
#2 0x7fe4f0e87e69 in TaskManager::XWindowTasksModel::data(QModelIndex const&, int) const /home/kfunk/devel/src/kf5/plasma-workspace/libtaskmanager/xwindowtasksmodel.cpp:646:38
...
As soon as QMenu becomes empty it is closed. This can happen when the application completely reloads its menu.
Instead, call deleteLater which will destroy the QAction later at which point it is automatically removed from the menu.
BUG: 399975
FIXED-IN: 5.14.4
CHANGELOG: Fixed global menu misbehaving and unexpectedly closing with certain applications
Differential Revision: https://phabricator.kde.org/D16297
A Presentation is also a Document so it would show up twice.
This patch filters out URLs we have already found and moves searching for specific
types (Presentation, Spreadsheet) before the more generic Document type.
Differential Revision: https://phabricator.kde.org/D16690
Summary:
Implements keyboard navigation via the up and down arrow keys for the Breeze window switcher.
Support for this went in with D16693.
CCBUG: 370185
Test Plan: Alt-tab, use arrow keys, it works!
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16886
Summary:
Libkworkspace has two duplicate enum values for the same thing, with one
marked as "//FIXME remove". My patchset is trying to kill that enum, but
we still use it for backwards compatibility in the L&F QML in the greeter.
In my split, I used the wrong one.
BUG: 401046
Reviewers: mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16891
Summary:
The favicon and places instances are created in the prepare() call,
leaking the instance from the last invocation. Delete the old
instance in teardown().
See also T9626.
Test Plan:
run several queries in krunner
-> instances are no longer leaked
Reviewers: #frameworks, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16410
Summary:
QSqlDatabase connection instances are global reference counted objects which
can be crated using the QSqlDatabase::addDatabase(...) method and later
retrieved with QSqlDatabase::database(connectionname).
Connections should only be used from a single thread, and should be cleaned
up with QSD::removeDatabase(name), which implicitly closes the connection
when the last reference is removed.
Currently, the same connection (name) is reused over all threads, and
the connection is only removed implicitly by replacing it via addDatabase().
This leads to warnings, i.e.: "QSqlDatabasePrivate::addDatabase: duplicate
connection name '...', old connection removed."
As one reference is held by the m_db member, the implicit removal triggers
another warning: "QSqlDatabasePrivate::removeDatabase: connection '..."
is still in use, all queries will cease to work."
According to the documentation, "It is highly recommended that you do not
keep a copy of the QSqlDatabase around as a member of a class, as this
will prevent the instance from being correctly cleaned up on shutdown."
There is no need to keep a reference using a member variable, as retrieving
an open connection via QSqlDatabase::database(...) is cheap.
Create a per-thread DB connection on first use, and remove the connections
when the FetchSqlite instance is torn down.
Delaying the open is beneficial for the favicon instance, which may be
unused when the icon is already cached on disk.
See also T9626.
BUG: 400723
Test Plan:
execute a query in krunner
1. Results are as expected
2. The 'QSqlDatabasePrivate::removeDatabase: connection ... is still in use,
all queries will cease to work.' warning no longer appears
3. The 'QSqlDatabasePrivate::addDatabase: duplicate connection name ...,
old connection removed' warning no longer appears
Reviewers: #frameworks, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16409
Summary:
Build the test dependencies as static library. Remove duplicate and
commented out lines. Use ecm_add_test instead of setting up everything
manually.
Test Plan: make && ctest
Reviewers: #frameworks, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16404
Summary:
Now if appIcon isn't defined, it will set the property as undefined.
file:///home/apol/devel/kde5/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationDelegate.qml:114: ReferenceError: appIcon is not defined
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16771
Summary:
Qt and GTK based applications have switched to using fontconfig for fonts
exclusively, so this code is mostly unused.
As for the remaining legacy X11 applications:
- mkfontdir only supports bitmap (e.g. PCF, BDF) fonts. For e.g.
truetype fonts, a mkfontscale call would be required. Lack of complaints
hints this is not used at all.
- the system dirs (sys_odir, sys_fdir) use KDEDIR(S), which is deprecated.
The dirs do not exist, thus the fontpath is unchanged.
- system dirs are typically allready included in the XServer font path
TLDR: (scalable) fonts in user dirs are not picked up due to missing
mkfontscale calls, and system dirs are already included.
This removes the dependency on xset and mkfontdir. The latter is important,
as e.g. on openSUSE the availability of mkfontdir triggers costly, extra
setup steps for X Core fonts on package installation.
Reviewers: #plasma, fvogt, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16530
Summary:
No need to introspect the service and then call a method by a hardcooded
name.
Test Plan: Compiles
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16657
Summary:
We don't need to introspect at runtime as KDED installs the interface
XML file.
Oddly KDED's package is called KDED not KF5KDED, hence the separate
find_package, I don't know if that's a bug in frameworks or not.
Test Plan: Compiles
Reviewers: #plasma, romangg
Reviewed By: #plasma, romangg
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16628
Summary:
This commit splits ksmserver's xsession shutdown logic from performing
the actual shutdown and running shutdown scripts and implement proposed
org.kde.Shutdown interface.
Intended longer term target is to move this to a separate executable.
KSMServer's existing logout dbus method still exists for compatibility
forwarding to the new interface.
There are 2 minor behavioural changes.
The shutdownMode property (which doesn't seem to do anything and is not
exposed in our UI) is not kept.
If you shutdown /whilst/ starting up somehow, previously we delayed
showing the logout prompt, we now delay performing the actual logout.
Test Plan:
Logged out / shut down using the old API
Logged out / shut down using the new DBus API
Reviewers: #plasma, apol, romangg
Reviewed By: #plasma, apol, romangg
Subscribers: romangg, apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16277
Summary:
For accessibility reasons we want to make sure that the QQuickWindow
thinks the focus is on the correct item. This will allow screen readers
to read which window is current in the window switcher.
Test Plan:
Running with accessibility inspection tools I see that the
right item has the focus with this change.
Reviewers: davidedmundson, chempfling, kwin
Reviewed By: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Maniphest Tasks: T7034
Differential Revision: https://phabricator.kde.org/D16638
Summary:
kcminit had a slot to start processing something and a signal to emit
when it's finished.
For DBus that's quite bad practice as it can leave you hanging in the
case of a kcminit crashing. It's better to use the return of the
original call to signal when something is done.
From ksmserver we can then just use DBus timeouts set on the interface
than a secondary timer.
We also remove a pointless blocking call to kcminit introspecting
everything, if kcminit is not running it will return with an error
immediately which is no slower than checking first if it's not running
and faster if it is.
Test Plan:
Logged in
Session logs showed kcminit ran
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: zzag, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16587
Summary:
The old code checked ksmserver->defaultSession in the Startup
constructor before ksmserver was set up by main.cpp
This refactor moves it to the job, so we'll be checking if we're
restoring or not after ksmserver has been set up by main.cpp as well as
making the initial code path a bit clearer.
Test Plan:
Logged in with session restore
Logged in with a default session
Reviewers: ahartmetz
Reviewed By: ahartmetz
Subscribers: ahartmetz, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16550
Summary:
The code is effectively 3 startup phases each of which has some parallel
methods that need to be complete before moving onto the next phase.
The old code had a tonne of methods all of which tracking what state
we're in and trying to start the next method in the chain handling
things out of order.
This simplifies everything into 3 composite kjobs. A lot more classes,
but each one tiny with the flow more readable.
Code should be effectively the same. The startup sound is moved ever so
slightly earlier to be when phase 2 starts rather than just after
kcminit2 finishes (midway through the old phase 2), but no significant
behavioural changes here.
Test Plan: Logged in with session restore and without
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: apol, broulik, anthonyfieroni, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16231
Summary:
Everything related to Plasma startup goes in Startup everything relating
to X session management stays in KSMServer. Restoring the window
manager currently stays inside ksmserver as it passes the session ID as
an argument and at various points checks if something the client is the
WM.
Relevant methods move to server.cpp to keep one class per cpp file.
KSMServer gains some signals as it can no longer call the startup methods
directly to continue the process.
This is part of a cleanup series in ksmserver. (The friend class will disappear
in the next commit)
Behaviour should remain identical.
Test Plan: Logged in on X
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16225
Summary:
Removing this is part of preparations for ksmserver to become just an X
session manager. See T9779.
Instead of ksmserver opening the greeter with a tonne of args and then
having a socket to watch for changes, the new mechanism is that we fire
and forget the prompt. Then the logout prompt calls back into ksmserver
with the request. Simplifies code greatly allows for moving.
KSMserver's shutdown DBus method remain on ksmserver for compatibility,
but ultimately spawning the prompt will move to libkworkspace and called
from the session directly.
QML API in the logout greeter remains mostly untouched.
Behavioural changes are minor:
There was a QML property "choose" exposed to the greeter if the default
shutdown option is set to None. Though we don't allow this in the KCM
and our default prompt doesn't use it.
We no longer block a user from saving a session whilst a logout prompt
is active.
Test Plan:
Logged out
Shutdown
Also ran with old ksmserver, still got a prompt
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16066