mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
kdeplasma-addons: deal with FIXME related to recentdocuments applet
note that KRecentFilesAction does not clear actions that are not in the config (e.g. entries stored in ~/.katana/share/apps/RecentDocuments or xbel file) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3835a88a75
commit
3f8c7e4f62
2 changed files with 3 additions and 21 deletions
|
@ -116,16 +116,11 @@ void RecentDocuments::setEnabled(bool enabled)
|
|||
foreach (File f, m_files) {
|
||||
m_watcher->addFile(f.path);
|
||||
}
|
||||
connect(m_watcher, SIGNAL(dirty(QString)), this, SLOT(modified(QString)));
|
||||
#warning FIXME: reload recent files on dirty() signal
|
||||
#if 0
|
||||
connect(m_watcher, SIGNAL(created(QString)), this, SLOT(added(QString)));
|
||||
connect(m_watcher, SIGNAL(deleted(QString)), this, SLOT(removed(QString)));
|
||||
#endif
|
||||
connect(m_watcher, SIGNAL(dirty(QString)), this, SLOT(readCurrentDocs()));
|
||||
connect(KSycoca::self(), SIGNAL(databaseChanged(QStringList)), this, SLOT(sycocaChanged(const QStringList &)));
|
||||
readCurrentDocs();
|
||||
} else if (m_enabled) {
|
||||
disconnect(m_watcher, SIGNAL(dirty(QString)), this, SLOT(modified(QString)));
|
||||
disconnect(m_watcher, SIGNAL(dirty(QString)), this, SLOT(readCurrentDocs()));
|
||||
disconnect(KSycoca::self(), SIGNAL(databaseChanged(QStringList)), this, SLOT(sycocaChanged(const QStringList &)));
|
||||
delete m_watcher;
|
||||
m_watcher = 0;
|
||||
|
@ -237,18 +232,6 @@ void RecentDocuments::removed(const QString &path)
|
|||
}
|
||||
}
|
||||
|
||||
void RecentDocuments::modified(const QString &path)
|
||||
{
|
||||
QList<File>::Iterator it(m_files.begin()),
|
||||
end(m_files.end());
|
||||
for (; it != end; ++it) {
|
||||
if ((*it).path == path) {
|
||||
(*it).dirty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RecentDocuments::sycocaChanged(const QStringList &types)
|
||||
{
|
||||
if (types.contains("apps") || types.contains("xdgdata-apps")) {
|
||||
|
|
|
@ -70,12 +70,11 @@ public:
|
|||
private Q_SLOTS:
|
||||
void added(const QString& path);
|
||||
void removed(const QString& path);
|
||||
void modified(const QString& path);
|
||||
void sycocaChanged(const QStringList &types);
|
||||
void loadDoc();
|
||||
void readCurrentDocs();
|
||||
|
||||
private:
|
||||
void readCurrentDocs();
|
||||
void load();
|
||||
App officeAppForMimeType(const QString &mimeType);
|
||||
App appForExec(const QString &execString);
|
||||
|
|
Loading…
Add table
Reference in a new issue