31 #include <QFileSystemWatcher> 33 #include <QStringList> 45 , Watcher_ {
new QFileSystemWatcher {
this } }
47 Watcher_->addPaths (
ToPaths (types));
49 SIGNAL (directoryChanged (QString)),
51 SLOT (scheduleUpdate ()));
54 void ItemsDatabase::scheduleUpdate ()
59 UpdateScheduled_ =
true;
62 UpdateScheduled_ =
false;
void update()
Updates the list of items.
Finds and parses XDG .desktop files.
QStringList ToPaths(const QList< Type > &types)
Returns a set of typical directories with desktop files of the given types.
ItemsDatabase(ICoreProxy_ptr proxy, const QList< Type > &types, QObject *parent=nullptr)
Creates the ItemsDatabase for the given types.
std::shared_ptr< ICoreProxy > ICoreProxy_ptr
void ExecuteLater(const DelayedExecutor::Actor_f &actor, int delay=0)