Commit b3410a12 authored by Daniel Nicoletti's avatar Daniel Nicoletti
Browse files

Fix going back to origins page and debug checked but not honored

Fixes RedHat bug: 891294
parent 3918b6e3
......@@ -482,9 +482,10 @@ void ApperKCM::setPage(const QString &page)
setButtons(KCModule::Default | KCModule::Apply);
emit changed(true); // THIS IS DUMB setButtons only take effect after changed goes true
emit changed(false);
generalSettingsPB->setChecked(true);
stackedWidgetBar->setCurrentIndex(BAR_SETTINGS);
stackedWidget->setCurrentWidget(m_settingsPage);
m_settingsPage->load();
stackedWidgetBar->setCurrentIndex(BAR_SETTINGS);
titleL->clear();
backTB->setEnabled(true);
}
......
......@@ -156,6 +156,13 @@ void Settings::on_showOriginsCB_stateChanged(int state)
if (!transaction->error()) {
m_busySeq->start();
}
KConfig config("apper");
KConfigGroup originsDialog(&config, "originsDialog");
bool showDevel = originsDialog.readEntry("showDevel", false);
if (showDevel != ui->showOriginsCB->isChecked()) {
originsDialog.writeEntry("showDevel", ui->showOriginsCB->isChecked());
}
}
bool Settings::hasChanges() const
......@@ -254,7 +261,13 @@ void Settings::load()
// Load origns list
if (m_roles & Transaction::RoleGetRepoList) {
on_showOriginsCB_stateChanged(Qt::Unchecked);
KConfigGroup originsDialog(&config, "originsDialog");
bool showDevel = originsDialog.readEntry("showDevel", false);
ui->showOriginsCB->setChecked(showDevel);
on_showOriginsCB_stateChanged(ui->showOriginsCB->checkState());
ui->originTV->setEnabled(true);
} else {
ui->originTV->setEnabled(false);
}
// hide battery options if we are on a desktop computer
......
......@@ -29,16 +29,11 @@
#include <QtDeclarative/QDeclarativeContext>
#include <QtDeclarative>
#include <QDBusConnection>
#include <QDBusServiceWatcher>
#include <Plasma/ToolTipManager>
#include <Plasma/ToolTipContent>
#include <Plasma/DeclarativeWidget>
#include <Plasma/Package>
#include <KNotification>
#include <PackageModel.h>
#include <PkTransaction.h>
#include <PkTransactionProgressModel.h>
......
Supports Markdown
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