Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 77eef414 authored by Laurent Montel's avatar Laurent Montel 😁

kdelibs4support--

parent 266f8090
......@@ -137,7 +137,7 @@ void Palapeli::ConfigDialog::solutionAreaChange(int index)
// index setting if .kcfg says "Int", but it does not officially support
// the QComboBox type.
Settings::setSolutionArea(index);
Settings::self()->writeConfig();
Settings::self()->save();
}
//END Palapeli::ConfigDialog
......
......@@ -84,7 +84,7 @@ void Palapeli::PuzzlePreview::toggleVisible()
{
setVisible(!isVisible());
Settings::setPuzzlePreviewVisible(isVisible());
Settings::self()->writeConfig();
Settings::self()->save();
}
void Palapeli::PuzzlePreview::mouseMoveEvent(QMouseEvent* event)
......@@ -137,7 +137,7 @@ void Palapeli::PuzzlePreview::writeConfigIfGeometryChanged()
// move() includes window frame, resize() doesn't :-/
Settings::setPuzzlePreviewGeometry(QRect(frameGeometry().topLeft(), size()));
Settings::self()->writeConfig();
Settings::self()->save();
m_geometryChanged = false;
}
......
......@@ -85,7 +85,7 @@ void Palapeli::TriggerMapper::readSettings()
m_associations.clear();
m_associations = Palapeli::TriggerMapper::defaultAssociations();
//read config
KConfigGroup group(KGlobal::config(), "Mouse Interaction");
KConfigGroup group(KSharedConfig::openConfig(), "Mouse Interaction");
const QStringList configKeys = group.keyList();
foreach (const QString& configKey, configKeys)
{
......@@ -115,14 +115,14 @@ void Palapeli::TriggerMapper::setAssociations(const QMap<QByteArray, Palapeli::T
triggerSerializations[it1.key()] << it1.value().serialized();
}
//clear config
KConfigGroup group(KGlobal::config(), "Mouse Interaction");
KConfigGroup group(KSharedConfig::openConfig(), "Mouse Interaction");
foreach (const QString& key, group.keyList())
group.deleteEntry(key);
//write config (in a way that supports multiple triggers for one interactor)
QMap<QByteArray, QList<QByteArray> >::const_iterator it1 = triggerSerializations.constBegin(), it2 = triggerSerializations.constEnd();
for (; it1 != it2; ++it1)
group.writeEntry(it1.key().data(), it1.value());
KGlobal::config()->sync();
KSharedConfig::openConfig()->sync();
}
Palapeli::EventProcessingFlags Palapeli::TriggerMapper::testTrigger(const QByteArray& interactor, QWheelEvent* event) const
......
......@@ -170,7 +170,7 @@ void Palapeli::MainWindow::enableMessages()
if (result == KMessageBox::Yes) {
qDebug() << "ENABLE ALL MESSAGES";
KMessageBox::enableAllMessages();
KGlobal::config()->sync(); // Save the changes to disk.
KSharedConfig::openConfig()->sync(); // Save the changes to disk.
}
}
......
......@@ -106,7 +106,7 @@ void Palapeli::PuzzleTableWidget::showStatusBar(bool visible)
m_zoomWidget->setVisible(visible);
//save setting
Settings::setShowStatusBar(visible);
Settings::self()->writeConfig();
Settings::self()->save();
}
void Palapeli::PuzzleTableWidget::reportProgress(int pieceCount, int partCount)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment