mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kded: check if timer is active instead of using member as re-creation guard
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
84afe0c4a9
commit
5968bc3c46
2 changed files with 4 additions and 8 deletions
|
@ -88,7 +88,6 @@ Kded::Kded(QObject *parent)
|
|||
: QObject(parent),
|
||||
m_pDirWatch(nullptr),
|
||||
m_pTimer(nullptr),
|
||||
m_recreateBusy(false),
|
||||
m_serviceWatcher(nullptr)
|
||||
{
|
||||
_self = this;
|
||||
|
@ -453,19 +452,18 @@ void Kded::updateResourceList()
|
|||
|
||||
void Kded::recreate()
|
||||
{
|
||||
m_recreateBusy = true;
|
||||
updateDirWatch(); // this would search all the directories
|
||||
runBuildSycoca();
|
||||
updateResourceList();
|
||||
m_recreateBusy = false;
|
||||
|
||||
initModules();
|
||||
}
|
||||
|
||||
void Kded::update(const QString& )
|
||||
void Kded::update(const QString& path)
|
||||
{
|
||||
if (!m_recreateBusy) {
|
||||
m_pTimer->start(10000);
|
||||
Q_UNUSED(path);
|
||||
if (!m_pTimer->isActive()) {
|
||||
m_pTimer->start(5000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,8 +178,6 @@ private:
|
|||
*/
|
||||
QTimer* m_pTimer;
|
||||
|
||||
bool m_recreateBusy;
|
||||
|
||||
QHash<QString,KDEDModule *> m_modules;
|
||||
//QHash<QString,QLibrary *> m_libs;
|
||||
QHash<QString,QObject *> m_dontLoad;
|
||||
|
|
Loading…
Add table
Reference in a new issue