Summary:
BUG: 418526
The profile group with the value `Default=1` is not always the default profile, for example in the profiles.ini file from the bug report:
```
[Profile1]
Name=default
IsRelative=1
Path=dun5pnnn.default
Default=1
[Profile0]
Name=default-default
IsRelative=1
Path=xewbk2mp.default-default
[Install11457493C5A56847]
Default=xewbk2mp.default-default
Locked=1```
In the text you can see that the profile with `dun5pnnn.default` has the value `Default=1`,
but it is not the default profile.
The correct default profile is in the `[Install11457493C5A56847]` group with the key `Default`.
Test Plan:
If you create a new profile it will be extracted as the default profile
(but the old value might still be cached see D28619).
Reviewers: #plasma, ngraham, bruns, broulik, meven
Reviewed By: meven
Subscribers: meven, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29326
Summary:
The copying/updating of the cache has been removed from the FetchSqlite class.
This allows the browsers to have handle the caching differently.
The firefox sqlite files are only copied if they changed. Before they were copied
for each match session.
The chrome favicon database is also only copied if needed
and the check is also made in the prepare method and not just when
the profile is initialized.
Test Plan:
For both firefox and chrome:
Plugin shows icons for results.
Add new bookmarks, close browser, the new bookmarks should show up with icons.
Reviewers: #plasma, ngraham, meven, broulik
Reviewed By: meven
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29726
Summary:
As requested in D28196 this patch removes the caching feature.
This caching causes issues when the user has multiple profiles, because the cached value
is not updated as long as the database exists.
Depends on D28473.
Test Plan: Should compile, no changes to lookup logic made.
Reviewers: #plasma, bruns, broulik
Reviewed By: bruns
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28619
Summary:
As requested in D28196 this patch handles the early return and the formatting.
Additionally QRegularExpression has been used instead of QRegExp and QStringLiteral instead of QString.
Test Plan:
Should compile and work exactly as before.
To test migration to QRegularExpression:
create multiple profiles
delete the `dbfile` entry from the general group in .config/kdeglobals
restart krunner and make sure that the value of the dbfile entry is the path to the default profile.
The bookmarks should also be displayed.
Reviewers: bruns, broulik, #plasma
Reviewed By: bruns
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28473
Summary:
Before: A pointer to the favicon gets written in the BookmarkMatch and using this pointer the icon gets created when the Plasma::QueryMatch gets created.
Now: Using the favicon pointer the icon gets created and written to the BookmarkMatch, when the QueryMatch is created the icon value is read.
This makes the code easier to understand and the BookmarkMatch is independent of the Favicon class.
Test Plan: Should compile and display icons.
Reviewers: apol, broulik, davidedmundson
Reviewed By: davidedmundson
Subscribers: bruns, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28439
Summary: Previously (accidental) SQL injection was easily possible.
Test Plan: Could still list bookmarks.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22623
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:
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:
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 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:
The favicons are located in the file favicons.sqlite file since FF 37 and the old table was removed in FF 41 resulting in crashes because the table wasn't found.
* Update SQL to match the tables in FF 58
* query.bindValue() needs a double colon in the string, see https://doc.qt.io/qt-5/qsqlquery.html#prepare
* Fix intendation (tab->spaces) in one line
BUG: 363136
Test Plan:
Firefox bookmark favicons now work and don't crash Krunner and Kickoff
{F5715653}
{F5715654}
Reviewers: #plasma, broulik, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: ngraham, elvisangelaccio, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10610
Summary:
Before: ~/.cache/krunnerbookmarkrunnerfirefoxdbfile.sqlite
After: ~/.cache/krunner/bookmarkrunnerfirefoxdbfile.sqlite
My guess is that the slash got lost while porting from KDE4.
Test Plan: KRunner creates the new file and uses it.
Reviewers: mlaurent
Reviewed By: mlaurent
Subscribers: mlaurent, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10605
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo kde-workspace, frameworks branch, at commit
049113e719dd2fc4446d054fa1a3aada330094f0