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: QIcon is only used in the implementation, not in the interface.
Test Plan: compile tested, no functional changes
Reviewers: #frameworks, davidedmundson
Reviewed By: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16402
Summary:
The favicon_id is not used in the query results, and may not even exist
when the places db has been created with FF 58 or later. In case the
column does not exist the query fails completely.
BUG: 398305
Test Plan:
1. Create a new FF profile
2. Add some bookmarks
3. Do some queries
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15305
Summary:
An entry from the moz_places db may have several referring entries
in the moz_bookmarks db, i.e. where moz_places.id = moz_bookmarks.fk.
One of these entries is the "main" entry, while the other ones are used
for tags. Only the main entry has a title, while the others have not.
The tag entries have the same type as the main entry, even the parents
have the same type (folder).
Another source for duplicate URLs are manually created bookmarks, e.g.
in different folders. These may have the same or different titles.
To remove these duplicates, merge all entries with the same URL. If a
URL has multiple entries, keep all with distinct titles, otherwise keep
at least one - a bookmark may have an empty title.
See also T9626
Test Plan:
- Create a bookmark
- Add one or more tags
- Open FFs bookmarks sidebar
- Copy and paste the new entry
- Copy and paste the new entry again, change its title
Search for the new bookmark. It should appear exactly twice, once
with the original title, once with the modified one.
Without patch, it appears 3 times, plus once more for each tag.
Caveat: The bookmarks db has to be checkpointed to make the new
entries visible in the main DB file. To force checkpointing, execute:
$> sqlite3 -column -header ~/.mozilla/firefox/*.default/places.sqlite "PRAGMA wal_checkpoint"
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, davidedmundson, zzag, ngraham, plasma-devel
Tags: #plasma
Maniphest Tasks: T9626
Differential Revision: https://phabricator.kde.org/D15357
Summary:
"Shutdown" is a noun ("The nuclear reactor is experiencing a shutdown!")
"Shut Down" is an imperative command with a verb ("Shut down the nuclear reactor!"), which is how everything else is phrased.
Test Plan:
- Login screen button now says "Shut Down"
- Searching for "shut down" in KRunner brings up the appropriate option ("shutdown" still works too)
- KRunner says, "Shut down the computer"
Reviewers: #vdg, #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15878
Summary:
Instead of constructing the query string on each favicon fetch just use
the (fixed) sql query string.
Test Plan:
make
Switch default "Web browser" in Applications to Chrome/Chromium
Query bookmark with krunner, or e.g.
qdbus-qt5 org.kde.krunner /App org.kde.krunner.App.querySingleRunner bookmarks Phabricator
Reviewers: #frameworks, davidedmundson
Reviewed By: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15491
Summary:
The query is no longer initialized for each query, just once, thus there
no longer is a need for the database parameter.
Test Plan: make
Reviewers: #frameworks, davidedmundson
Reviewed By: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15490
Summary:
The db scheme will not change during the FetchSqlite livetime. Query
the scheme just once per krunner invocation instead of once per result.
Test Plan: make
Reviewers: #frameworks, davidedmundson
Reviewed By: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15489
Summary: This is a preparatory patch required for further rework
Test Plan: make
Reviewers: #frameworks, davidedmundson
Reviewed By: davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15488
Summary:
Its rather pointless to spew an error message each time a query is done.
Output the warning message just once (on the default logging level), and
output further messages only at debug level.
Reviewers: #plasma, ngraham, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D14806
The runner doesn't have any config on its own but uses the Web Shortcuts configuration.
Add a "configure" button that opens that KCM straight away.
BUG: 398242
FIXED-IN: 5.14.0
Differential Revision: https://phabricator.kde.org/D15430
Summary:
QDir.entryInfoList(NoDotAndDotDot) always returns an empty list, as it
requires one of QDir::Files, QDir::Dirs or QDir::Drives or any
combination thereof.
Instead of implementing it manually, use QDir::removeRecursively().
Test Plan:
Watch ~/.cache/krunner/
When krunner is closed, KRunner-Favicons-firefox-default should
be emptied and deleted.
Reviewers: #plasma, davidedmundson, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15391
Summary: We use "Suspend" and "Hibernate" in most places except for KRunner, where we currently use more technical terms that expose the implementation details (suspend to ram vs suspend to disk). Let's be consistent.
Reviewers: #plasma, #vdg, davidedmundson, broulik
Reviewed By: #plasma, davidedmundson, broulik
Subscribers: sudhirkhanger, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15386
Summary:
When the profile has initially been looked up, the location is saved to
the global config. Afterwards, the location is never updated even if
the profile has been replaced, due to an inverted exits() check.
Test Plan:
1. Check dbfile in kdeglobals is pointing to a valid profile
2a. Change the dbfile setting - or -
2b. Remove the existing profile and create a new one
3. Restart krunner - it should fix the config entry/use the new profile
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15254
Summary:
Bookmarks may have no title, the user is free to delete it when creating
a bookmark.
A bookmark without URL would be useless (there were nothing to refer to),
so ignore any bookmark with an empty URL.
Simplify check for Firefox specific "place:" URLs.
Test Plan:
Search for "Recent" or "place"
"Recent Tags" is still filtered out
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15356
Summary:
The factory returns the same object when the browser name is not changed.
Connecting the signal again leads to multiple calls to the slot each
time the signal is emitted.
See also T9626
Test Plan:
1. Add some debug output to the teardown() slot
2. Open the krunner multiple times and enter some query
3. teardown() is called exactly once
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: davidedmundson, broulik, plasma-devel
Tags: #plasma
Maniphest Tasks: T9626
Differential Revision: https://phabricator.kde.org/D15306
Summary:
The favicon_id is not used in the query results, and may not even exist
when the places db has been created with FF 58 or later. In case the
column does not exist the query fails completely.
BUG: 398305
Test Plan:
1. Create a new FF profile
2. Add some bookmarks
3. Do some queries
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15305
Summary:
AppStreamQt since 0.10.6 allows to pass on error messages in case some
errors occured when loading the AppStream data.
CCBUG: 374279
Reviewers: #plasma, apol, ngraham
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D14804
Summary:
The return code of the Pool::load() method is somewhat misleading, as it
returns true only if there were no errors at all. The error flag is set on the first
validation error, but the pool will contain meaningful data nevertheless.
BUG: 397531
Test Plan:
Searching for "blend"
Unfixed version:
No results are returned under "Software Center"
Fixed version:
Software Center: "Get Blender", "Get Hugin", ...
Reviewers: #plasma, #frameworks, apol
Reviewed By: apol
Subscribers: ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D14807
For KCMs we get a relative entryPath() for our KService resulting in an invalid URL being created.
CCBUG: 397070
Differential Revision: https://phabricator.kde.org/D14546
KFilePlacesModel internally only stores search:/ URLs and then translates them to the correct Baloo query as needed.
Differential Revision: https://phabricator.kde.org/D13841
The codepath for opening devices was never actually entered as always a QUrl was set as data.
This resulted in errors like "Cannot open URL /org/freedesktop/someudi".
Moreover, for some reason the run() code created a new KFilePlacesModel but since devices are added delayed,
searching for a device in the model right after creation doesn't work.
The code is adjusted to use the one KFilePlacesModel instance in the helper, since run() is executed on the main thread anyway.
Differential Revision: https://phabricator.kde.org/D13840
This codepath is hit when the search query is very short. Fixes "D" and "d" finding different, sometimes no, results.
BUG: 394202
FIXED-IN: 5.12.6
Differential Revision: https://phabricator.kde.org/D12927
Summary:
Krunner::match is performed in potentially multiple overlapping threads
as a user presses each character. Qt SQL is not thread safe according to
the docs or according to the numerous reports.
It's a bit of a blind patch, ideally we should only use the database in
the thread that opened it.
This patch at least this means queries will be queued which I think will
be enough.
CCBUG: 363136
Test Plan: Restarted krunner. Still saw my firefox bookmarks
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: rempt, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12683