mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-06 02:15:52 +00:00
some refactoring
* fix undefinded behaviour * drop dbus timout, use generic timeout insead * drop load source to own cmake key * update contributing.md
This commit is contained in:
@ -38,8 +38,8 @@ bool AWKeyCache::addKeyToCache(const QString type, const QString key)
|
||||
|
||||
cache.beginGroup(type);
|
||||
QStringList cachedValues;
|
||||
for (auto key : cache.allKeys())
|
||||
cachedValues.append(cache.value(key).toString());
|
||||
for (auto number : cache.allKeys())
|
||||
cachedValues.append(cache.value(number).toString());
|
||||
|
||||
if (type == QString("hdd")) {
|
||||
QStringList allDevices
|
||||
@ -51,6 +51,7 @@ bool AWKeyCache::addKeyToCache(const QString type, const QString key)
|
||||
if (cachedValues.contains(device))
|
||||
continue;
|
||||
qCInfo(LOG_AW) << "Found new key" << device << "for type" << type;
|
||||
cachedValues.append(device);
|
||||
cache.setValue(
|
||||
QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')),
|
||||
device);
|
||||
@ -63,6 +64,7 @@ bool AWKeyCache::addKeyToCache(const QString type, const QString key)
|
||||
if (cachedValues.contains(device))
|
||||
continue;
|
||||
qCInfo(LOG_AW) << "Found new key" << device << "for type" << type;
|
||||
cachedValues.append(device);
|
||||
cache.setValue(
|
||||
QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')),
|
||||
device);
|
||||
|
Reference in New Issue
Block a user