mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 07:57:19 +00:00
* drop workspace.xml from source tree (it is changed too offen)
* fix export and import configurations for json files
This commit is contained in:
parent
17a8a1734b
commit
c1a8c17ecb
1
.gitignore
vendored
1
.gitignore
vendored
@ -44,3 +44,4 @@ build
|
|||||||
src
|
src
|
||||||
pkg
|
pkg
|
||||||
|
|
||||||
|
sources/.idea/workspace.xml
|
||||||
|
1034
sources/.idea/workspace.xml
generated
1034
sources/.idea/workspace.xml
generated
File diff suppressed because it is too large
Load Diff
@ -269,7 +269,7 @@ void AWConfigHelper::readFile(QSettings &settings, const QString key,
|
|||||||
|
|
||||||
QFile file(fileName);
|
QFile file(fileName);
|
||||||
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
QString text = QTextCodec::codecForMib(106)->toUnicode(file.readAll());
|
QString text = QString::fromUtf8(file.readAll());
|
||||||
file.close();
|
file.close();
|
||||||
settings.setValue(key, text);
|
settings.setValue(key, text);
|
||||||
} else {
|
} else {
|
||||||
@ -331,14 +331,17 @@ void AWConfigHelper::writeFile(QSettings &settings, const QString key,
|
|||||||
qCDebug(LOG_AW) << "Key" << key;
|
qCDebug(LOG_AW) << "Key" << key;
|
||||||
qCDebug(LOG_AW) << "File" << fileName;
|
qCDebug(LOG_AW) << "File" << fileName;
|
||||||
|
|
||||||
if (settings.contains(key)) {
|
if (!settings.contains(key))
|
||||||
QFile file(fileName);
|
return;
|
||||||
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
|
||||||
QDataStream out(&file);
|
QFile file(fileName);
|
||||||
out << settings.value(key).toString().toUtf8();
|
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||||
file.close();
|
QTextStream out(&file);
|
||||||
} else {
|
out.setCodec("UTF-8");
|
||||||
qCWarning(LOG_LIB) << "Could not open" << file.fileName();
|
out << settings.value(key).toString().toUtf8();
|
||||||
}
|
out.flush();
|
||||||
|
file.close();
|
||||||
|
} else {
|
||||||
|
qCWarning(LOG_LIB) << "Could not open" << file.fileName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,8 +69,7 @@ void AWDataEngineAggregator::dropSource(const QString source)
|
|||||||
qCDebug(LOG_AW) << "Source" << source;
|
qCDebug(LOG_AW) << "Source" << source;
|
||||||
|
|
||||||
// FIXME there is no possibility to check to which dataengine source
|
// FIXME there is no possibility to check to which dataengine source
|
||||||
// connected
|
// connected we will try to disconnect it from systemmonitor and extsysmon
|
||||||
// we will try to disconnect it from systemmonitor and extsysmon
|
|
||||||
m_dataEngines[QString("systemmonitor")]->disconnectSource(source, parent());
|
m_dataEngines[QString("systemmonitor")]->disconnectSource(source, parent());
|
||||||
m_dataEngines[QString("extsysmon")]->disconnectSource(source, parent());
|
m_dataEngines[QString("extsysmon")]->disconnectSource(source, parent());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user