D23112: Add a event Spy for GtkFileChooser recent files

2019-08-17 Thread Méven Car
This revision was automatically updated to reflect the committed changes. Closed by commit R161:acbc21c15622: Add a event Spy for GtkFileChooser recent files (authored by meven). REPOSITORY R161 KActivity Manager Service CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23112?vs=63913&i

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-17 Thread Méven Car
meven updated this revision to Diff 63913. meven added a comment. Reduce the amount of included code and linked libraries REPOSITORY R161 KActivity Manager Service CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23112?vs=63890&id=63913 BRANCH arcpatch-D23112 REVISION DETAIL h

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-16 Thread Méven Car
meven updated this revision to Diff 63890. meven added a comment. Ensure the log category is exported, compare only chars, variable naming fix REPOSITORY R161 KActivity Manager Service CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23112?vs=63830&id=63890 BRANCH arcpatch-D23112

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-16 Thread Stefan Brüns
bruns added inline comments. INLINE COMMENTS > ivan wrote in GtkEventSpy.cpp:126 > No need to compare chars with strings: > > if (!exec.isEmpty() && exec[0] == '\'' && exec.back() == '\'') missing `QChar('\'')`, otherwise it breaks with QT_NO_CAST_FROM_ASCII -> `if (exec.startsWith(QChar('\'

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-16 Thread Ivan Čukić
ivan requested changes to this revision. ivan added a comment. This revision now requires changes to proceed. Another tiny change, and I think it is ready to land. Unless someone else sees other issues. INLINE COMMENTS > GtkEventSpy.cpp:126 > + > +if (exec.at(0) == QStringLiteral("'"

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-15 Thread Méven Car
meven updated this revision to Diff 63830. meven added a comment. run uncrustify-kf5 REPOSITORY R161 KActivity Manager Service CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23112?vs=63786&id=63830 BRANCH master REVISION DETAIL https://phabricator.kde.org/D23112 AFFECTED FI

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-15 Thread Méven Car
meven updated this revision to Diff 63786. meven marked 9 inline comments as done. meven added a comment. Remove unnecessary pointer use, code formatting REPOSITORY R161 KActivity Manager Service CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23112?vs=63724&id=63786 BRANCH mast

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-15 Thread Ivan Čukić
ivan added inline comments. INLINE COMMENTS > GtkEventSpy.cpp:68 > +QDateTime visited; > +QList *applications; > + No need for this to be a pointer to a list. Make it just `QList applications`. > GtkEventSpy.cpp:70 > + > +Bookmark(){ > +applications = new QList(); The cons

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-14 Thread Méven Car
meven marked an inline comment as done. meven added a comment. In D23112#511779 , @ngraham wrote: > Cool stuff. Does it handle duplicates when a file is present in both GTKFileChooserRecent and KActivitiesStats? Yes, the file url is a sor

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-14 Thread Méven Car
meven marked 2 inline comments as done. meven added inline comments. INLINE COMMENTS > ngraham wrote in kactivitymanagerd-plugin-gtk-eventspy.json:41 > Not sure you need to add translations of your own name here This was done for Ivan so I guess the translation team fills this. REPOSITORY R16

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-14 Thread Méven Car
meven updated this revision to Diff 63724. meven added a comment. grammar REPOSITORY R161 KActivity Manager Service CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23112?vs=63713&id=63724 BRANCH master REVISION DETAIL https://phabricator.kde.org/D23112 AFFECTED FILES src/s

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-14 Thread Nathaniel Graham
ngraham added a comment. Cool stuff. Does it handle duplicates when a file is present in both GTKFileChooserRecent and KActivitiesStats? INLINE COMMENTS > kactivitymanagerd-plugin-gtk-eventspy.json:41 > +"Name[zh_CN]": "Méven Car", > +"Name[zh_TW]": "Méven Car

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-14 Thread Méven Car
meven marked 5 inline comments as done. meven added inline comments. INLINE COMMENTS > ivan wrote in GtkEventSpy.cpp:143 > Let's hope commands will never have spaces in them :) It is to just extract the executable name, we don't want to have an exploding number of initiatingAgent for every argu

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-14 Thread Méven Car
meven updated this revision to Diff 63713. meven added a comment. Add const where need be, simplify KTrader query REPOSITORY R161 KActivity Manager Service CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23112?vs=63669&id=63713 BRANCH master REVISION DETAIL https://phabricato

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-14 Thread Méven Car
meven added a comment. In D23112#511354 , @ivan wrote: > Thanks for geting involved this much! :D REPOSITORY R161 KActivity Manager Service REVISION DETAIL https://phabricator.kde.org/D23112 To: meven, #frameworks, ivan Cc: broulik,

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-13 Thread Kai Uwe Broulik
broulik added inline comments. INLINE COMMENTS > GtkEventSpy.cpp:135 > +// See > https://techbase.kde.org/Development/Tutorials/Services/Traders#The_KTrader_Query_Language > +QString query = QString("exist Exec and ((Exec ~~ '%1') or (exist > GenericName and '%1' ~~ GenericName)

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-13 Thread Ivan Čukić
ivan requested changes to this revision. ivan added a comment. This revision now requires changes to proceed. Thanks for geting involved this much! INLINE COMMENTS > GtkEventSpy.cpp:129 > +// remove "'" caracters wrapping the command > +exec = exec.mid(1, exec.size() -2 ); > +

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-13 Thread Méven Car
meven updated this revision to Diff 63669. meven added a comment. Add a logging category REPOSITORY R161 KActivity Manager Service CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23112?vs=63654&id=63669 BRANCH master REVISION DETAIL https://phabricator.kde.org/D23112 AFFECTE

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-13 Thread Méven Car
meven updated this revision to Diff 63654. meven added a comment. Readd include QDebug used by qWarning REPOSITORY R161 KActivity Manager Service CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23112?vs=63647&id=63654 BRANCH master REVISION DETAIL https://phabricator.kde.org/

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-13 Thread Méven Car
meven updated this revision to Diff 63647. meven marked an inline comment as done. meven added a comment. Remove unused include REPOSITORY R161 KActivity Manager Service CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23112?vs=63641&id=63647 BRANCH master REVISION DETAIL http

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-13 Thread Méven Car
meven updated this revision to Diff 63641. meven added a comment. Use KServiceTypeTrader to look for apps being used REPOSITORY R161 KActivity Manager Service CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23112?vs=63603&id=63641 BRANCH master REVISION DETAIL https://phabric

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-13 Thread Méven Car
meven added a comment. In D23112#510798 , @broulik wrote: > Can you check out the `KBookmarks` framework which has classes for processing xbel files Thanks for pointing it out. I just did, and It does not seem to cover my use case here

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-12 Thread Kai Uwe Broulik
broulik added inline comments. INLINE COMMENTS > GtkEventSpy.cpp:125 > + > +app.name = attributes.value("exec"); > +// remove "'" caracters wrapping the command and any character after > a space It stores the full `Exec` line of the desktop file, including the `%u`. What you pro

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-12 Thread Kai Uwe Broulik
broulik added a comment. Can you check out the `KBookmarks` framework which has classes for processing xbel files REPOSITORY R161 KActivity Manager Service REVISION DETAIL https://phabricator.kde.org/D23112 To: meven, #frameworks, ivan Cc: broulik, plasma-devel, LeGast00n, jraleigh, fba

D23112: Add a event Spy for GtkFileChooser recent files

2019-08-12 Thread Méven Car
meven created this revision. meven added reviewers: Frameworks, ivan. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. meven requested review of this revision. REVISION SUMMARY GtkFileChooser/GtkRecentManager follows https://www.freedesktop.org/wiki/Specifications/deskto