forked from qt-creator/qt-creator
Remember progress details pinned state and default to "pinned".
Making the default "pinned" will hopefully make people realize earlier that the progress information has moved to the new location. Change-Id: I5dbb3cae3680f724369b1a025cf38c5317a29fd0 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -51,6 +51,10 @@
|
|||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
static const char kSettingsGroup[] = "Progress";
|
||||||
|
static const char kDetailsPinned[] = "DetailsPinned";
|
||||||
|
|
||||||
using namespace Core;
|
using namespace Core;
|
||||||
using namespace Core::Internal;
|
using namespace Core::Internal;
|
||||||
@@ -283,8 +287,18 @@ ProgressManagerPrivate::~ProgressManagerPrivate()
|
|||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ProgressManagerPrivate::readSettings()
|
||||||
|
{
|
||||||
|
QSettings *settings = ICore::settings();
|
||||||
|
settings->beginGroup(QLatin1String(kSettingsGroup));
|
||||||
|
m_progressViewPinned = settings->value(QLatin1String(kDetailsPinned), true).toBool();
|
||||||
|
settings->endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
void ProgressManagerPrivate::init()
|
void ProgressManagerPrivate::init()
|
||||||
{
|
{
|
||||||
|
readSettings();
|
||||||
|
|
||||||
m_statusBarWidgetContainer = new Core::StatusBarWidget;
|
m_statusBarWidgetContainer = new Core::StatusBarWidget;
|
||||||
m_statusBarWidget = new QWidget;
|
m_statusBarWidget = new QWidget;
|
||||||
QHBoxLayout *layout = new QHBoxLayout(m_statusBarWidget);
|
QHBoxLayout *layout = new QHBoxLayout(m_statusBarWidget);
|
||||||
@@ -658,6 +672,11 @@ void ProgressManagerPrivate::progressDetailsToggled(bool checked)
|
|||||||
{
|
{
|
||||||
m_progressViewPinned = checked;
|
m_progressViewPinned = checked;
|
||||||
updateVisibility();
|
updateVisibility();
|
||||||
|
|
||||||
|
QSettings *settings = ICore::settings();
|
||||||
|
settings->beginGroup(QLatin1String(kSettingsGroup));
|
||||||
|
settings->setValue(QLatin1String(kDetailsPinned), m_progressViewPinned);
|
||||||
|
settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
ToggleButton::ToggleButton(QWidget *parent)
|
ToggleButton::ToggleButton(QWidget *parent)
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ private slots:
|
|||||||
|
|
||||||
void slotRemoveTask();
|
void slotRemoveTask();
|
||||||
private:
|
private:
|
||||||
|
void readSettings();
|
||||||
void initInternal();
|
void initInternal();
|
||||||
void stopFadeOfSummaryProgress();
|
void stopFadeOfSummaryProgress();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user