diff --git a/.gitignore b/.gitignore index d4af69a..92447d4 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ build src pkg +sources/.idea/workspace.xml diff --git a/sources/.idea/workspace.xml b/sources/.idea/workspace.xml deleted file mode 100644 index 92726ab..0000000 --- a/sources/.idea/workspace.xml +++ /dev/null @@ -1,1034 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1445013689481 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sources/awesome-widget/plugin/awconfighelper.cpp b/sources/awesome-widget/plugin/awconfighelper.cpp index 14047ea..1d1eac5 100644 --- a/sources/awesome-widget/plugin/awconfighelper.cpp +++ b/sources/awesome-widget/plugin/awconfighelper.cpp @@ -269,7 +269,7 @@ void AWConfigHelper::readFile(QSettings &settings, const QString key, QFile file(fileName); if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { - QString text = QTextCodec::codecForMib(106)->toUnicode(file.readAll()); + QString text = QString::fromUtf8(file.readAll()); file.close(); settings.setValue(key, text); } else { @@ -331,14 +331,17 @@ void AWConfigHelper::writeFile(QSettings &settings, const QString key, qCDebug(LOG_AW) << "Key" << key; qCDebug(LOG_AW) << "File" << fileName; - if (settings.contains(key)) { - QFile file(fileName); - if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { - QDataStream out(&file); - out << settings.value(key).toString().toUtf8(); - file.close(); - } else { - qCWarning(LOG_LIB) << "Could not open" << file.fileName(); - } + if (!settings.contains(key)) + return; + + QFile file(fileName); + if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { + QTextStream out(&file); + out.setCodec("UTF-8"); + out << settings.value(key).toString().toUtf8(); + out.flush(); + file.close(); + } else { + qCWarning(LOG_LIB) << "Could not open" << file.fileName(); } } diff --git a/sources/awesome-widget/plugin/awdataengineaggregator.cpp b/sources/awesome-widget/plugin/awdataengineaggregator.cpp index 9af4091..14f8789 100644 --- a/sources/awesome-widget/plugin/awdataengineaggregator.cpp +++ b/sources/awesome-widget/plugin/awdataengineaggregator.cpp @@ -69,8 +69,7 @@ void AWDataEngineAggregator::dropSource(const QString source) qCDebug(LOG_AW) << "Source" << source; // FIXME there is no possibility to check to which dataengine source - // connected - // we will try to disconnect it from systemmonitor and extsysmon + // connected we will try to disconnect it from systemmonitor and extsysmon m_dataEngines[QString("systemmonitor")]->disconnectSource(source, parent()); m_dataEngines[QString("extsysmon")]->disconnectSource(source, parent()); }