]> git.sur5r.net Git - bacula/bacula/commitdiff
Do not restore spliiter settings if the settings do not contain settings
authorDirk H Bartley <dbartley@schupan.com>
Wed, 22 Jul 2009 00:13:12 +0000 (00:13 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Wed, 22 Jul 2009 00:13:12 +0000 (00:13 +0000)
for that splitter.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@9081 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/jobgraphs/jobplot.cpp
bacula/src/qt-console/joblist/joblist.cpp
bacula/src/qt-console/restore/restore.cpp
bacula/src/qt-console/restore/restore.h
bacula/src/qt-console/restore/restoretree.cpp
bacula/src/qt-console/restore/restoretree.ui
bacula/src/qt-console/status/clientstat.cpp
bacula/src/qt-console/status/dirstat.cpp
bacula/src/qt-console/status/storstat.cpp

index 92a2f1a8af5e1f0101ad1beb1b02a872953e7c45..2fe38d5f2826f2c97ec941779258ba7d4a2173bb 100644 (file)
@@ -571,6 +571,6 @@ void JobPlot::readSplitterSettings()
 {
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup("JobPlot");
-   m_splitter->restoreState(settings.value("m_splitterSizes").toByteArray());
+   if (settings.contains("m_splitterSizes")) { m_splitter->restoreState(settings.value("m_splitterSizes").toByteArray()); }
    settings.endGroup();
 }
index 27cc84085987229178eca42a8dc536859ece3d9b..0455a668e387ebe2dd5ac6ebe7d847b0c55dcc88 100644 (file)
@@ -50,7 +50,7 @@ JobList::JobList(const QString &mediaName, const QString &clientName,
           const QString &jobName, const QString &filesetName, QTreeWidgetItem *parentTreeWidgetItem)
 {
    setupUi(this);
-   m_name = ""; /* treeWidgetName has a virtual override in this class */
+   m_name = "Jobs Run"; /* treeWidgetName has a virtual override in this class */
    m_mediaName = mediaName;
    m_clientName = clientName;
    m_jobName = jobName;
@@ -84,8 +84,8 @@ JobList::JobList(const QString &mediaName, const QString &clientName,
    area->setObjectName(QString::fromUtf8("area"));
    area->setWidget(frame);
    area->setWidgetResizable(true);
-   m_splitter->addWidget(mp_tableWidget);
    m_splitter->addWidget(area);
+   m_splitter->addWidget(mp_tableWidget);
 
    gridLayout->addWidget(m_splitter, 0, 0, 1, 1);
    readSettings();
@@ -367,15 +367,15 @@ void JobList::currentStackItem()
 void JobList::treeWidgetName(QString &desc)
 {
    if (m_mediaName != "" ) {
-     desc = tr("JobList of Volume %1").arg(m_mediaName);
+     desc = tr("Jobs Run on Volume %1").arg(m_mediaName);
    } else if (m_clientName != "" ) {
-     desc = tr("JobList of Client %1").arg(m_clientName);
+     desc = tr("Jobs Run from Client %1").arg(m_clientName);
    } else if (m_jobName != "" ) {
-     desc = tr("JobList of Job %1").arg(m_jobName);
+     desc = tr("Jobs Run of Job %1").arg(m_jobName);
    } else if (m_filesetName != "" ) {
-     desc = tr("JobList of fileset %1").arg(m_filesetName);
+     desc = tr("Jobs Run with fileset %1").arg(m_filesetName);
    } else {
-     desc = tr("JobList");
+     desc = tr("Jobs Run");
    }
 }
 
@@ -582,10 +582,10 @@ void JobList::writeSettings()
 void JobList::readSettings()
 {
    m_groupText = "JobListPage";
-   m_splitText = "splitterSizes_1";
+   m_splitText = "splitterSizes_2";
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup(m_groupText);
-   m_splitter->restoreState(settings.value(m_splitText).toByteArray());
+   if (settings.contains(m_splitText)) { m_splitter->restoreState(settings.value(m_splitText).toByteArray()); }
    filterCopyCheckBox->setCheckState((Qt::CheckState)settings.value("FilterCopyCheckState").toInt());
    filterMigrationCheckBox->setCheckState((Qt::CheckState)settings.value("FilterMigrationCheckState").toInt());
    settings.endGroup();
index b349fdefea810a41cbf0450898ba6a6fa5a01ba2..557a6d05b4ae9a7cf293e6b16e575aef9c0d04cd 100644 (file)
@@ -491,7 +491,8 @@ void restorePage::writeSettings()
 {
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup("RestorePage");
-   settings.setValue("splitterSizes", splitter->saveState());
+   m_splitText = "splitterSizes_2";
+   settings.setValue(m_splitText, splitter->saveState());
    settings.endGroup();
 }
 
@@ -502,6 +503,6 @@ void restorePage::readSettings()
 {
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup("RestorePage");
-   splitter->restoreState(settings.value("splitterSizes").toByteArray());
+   if (settings.contains(m_splitText)) { splitter->restoreState(settings.value(m_splitText).toByteArray()); }
    settings.endGroup();
 }
index 92f972f66554e4849110dcef17d19ce86d6a8fc5..c25f2fdc96dba931e9a07d098ee5d48872d992eb 100644 (file)
@@ -110,6 +110,7 @@ private:
    QHash<QString, QTreeWidgetItem *> m_dirPaths;
    QHash<QTreeWidgetItem *,QString> m_dirTreeItems;
    QRegExp m_rx;
+   QString m_splitText;
 };
 
 
index b410d3cf7d4c65a915b4f38489b3f8165beb2092..094fc73d83c6a1c240ea92f9360657310b6c74a7 100644 (file)
@@ -714,12 +714,12 @@ void restoreTree::writeSettings()
 void restoreTree::readSettings()
 {
    m_groupText = tr("RestoreTreePage");
-   m_splitText1 = "splitterSizes1_2";
-   m_splitText2 = "splitterSizes2_2";
+   m_splitText1 = "splitterSizes1_3";
+   m_splitText2 = "splitterSizes2_3";
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup(m_groupText);
-   m_splitter->restoreState(settings.value(m_splitText1).toByteArray());
-   splitter->restoreState(settings.value(m_splitText2).toByteArray());
+   if (settings.contains(m_splitText1)) { m_splitter->restoreState(settings.value(m_splitText1).toByteArray()); }
+   if (settings.contains(m_splitText2)) { splitter->restoreState(settings.value(m_splitText2).toByteArray()); }
    settings.endGroup();
 }
 
index 9362ac0ea559d2e5bb8cea8d3fd8a12a0123e7ec..77f1affdd298d5a578e2b1631ac1650eae950f02 100644 (file)
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>restoreTreeForm</class>
- <widget class="QWidget" name="restoreTreeForm" >
-  <property name="geometry" >
+ <widget class="QWidget" name="restoreTreeForm">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>711</width>
-    <height>524</height>
+    <width>695</width>
+    <height>432</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Form</string>
   </property>
-  <widget class="QSplitter" name="splitter" >
-   <property name="geometry" >
+  <widget class="QSplitter" name="splitter">
+   <property name="geometry">
     <rect>
-     <x>60</x>
-     <y>160</y>
+     <x>120</x>
+     <y>190</y>
      <width>382</width>
      <height>221</height>
     </rect>
    </property>
-   <property name="orientation" >
+   <property name="orientation">
     <enum>Qt::Horizontal</enum>
    </property>
-   <widget class="QWidget" name="layoutWidget" >
-    <layout class="QVBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
-     <property name="spacing" >
+   <widget class="QWidget" name="layoutWidget">
+    <layout class="QVBoxLayout">
+     <property name="spacing">
       <number>6</number>
      </property>
+     <property name="margin">
+      <number>0</number>
+     </property>
      <item>
-      <widget class="QLabel" name="jobTabelLabel" >
-       <property name="text" >
+      <widget class="QLabel" name="jobTabelLabel">
+       <property name="text">
         <string>Jobs</string>
        </property>
-       <property name="alignment" >
+       <property name="alignment">
         <set>Qt::AlignCenter</set>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QTableWidget" name="jobTable" />
+      <widget class="QTableWidget" name="jobTable"/>
      </item>
      <item>
-      <widget class="QLabel" name="prLabel1" >
-       <property name="text" >
+      <widget class="QLabel" name="prLabel1">
+       <property name="text">
         <string>TextLabel</string>
        </property>
-       <property name="alignment" >
+       <property name="alignment">
         <set>Qt::AlignCenter</set>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QProgressBar" name="prBar1" >
-       <property name="enabled" >
+      <widget class="QProgressBar" name="prBar1">
+       <property name="enabled">
         <bool>true</bool>
        </property>
-       <property name="value" >
+       <property name="value">
         <number>24</number>
        </property>
-       <property name="orientation" >
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QLabel" name="prLabel2" >
-       <property name="text" >
+      <widget class="QLabel" name="prLabel2">
+       <property name="text">
         <string>TextLabel</string>
        </property>
-       <property name="alignment" >
+       <property name="alignment">
         <set>Qt::AlignCenter</set>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QProgressBar" name="prBar2" >
-       <property name="enabled" >
+      <widget class="QProgressBar" name="prBar2">
+       <property name="enabled">
         <bool>true</bool>
        </property>
-       <property name="value" >
+       <property name="value">
         <number>24</number>
        </property>
-       <property name="orientation" >
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
       </widget>
      </item>
     </layout>
    </widget>
-   <widget class="QTreeWidget" name="directoryTree" />
-   <widget class="QWidget" name="layoutWidget_1" >
-    <layout class="QVBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
+   <widget class="QTreeWidget" name="directoryTree">
+    <column>
+     <property name="text">
+      <string notr="true">1</string>
      </property>
-     <property name="spacing" >
+    </column>
+   </widget>
+   <widget class="QWidget" name="layoutWidget_1">
+    <layout class="QVBoxLayout">
+     <property name="spacing">
       <number>6</number>
      </property>
+     <property name="margin">
+      <number>0</number>
+     </property>
      <item>
-      <widget class="QLabel" name="fileLabel" >
-       <property name="text" >
+      <widget class="QLabel" name="fileLabel">
+       <property name="text">
         <string>Files</string>
        </property>
-       <property name="alignment" >
+       <property name="alignment">
         <set>Qt::AlignCenter</set>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QTableWidget" name="fileTable" />
+      <widget class="QTableWidget" name="fileTable"/>
      </item>
     </layout>
    </widget>
-   <widget class="QWidget" name="layoutWidget_2" >
-    <layout class="QVBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
-     <property name="spacing" >
+   <widget class="QWidget" name="layoutWidget_2">
+    <layout class="QVBoxLayout">
+     <property name="spacing">
       <number>6</number>
      </property>
+     <property name="margin">
+      <number>0</number>
+     </property>
      <item>
-      <widget class="QLabel" name="versionLabel" >
-       <property name="text" >
+      <widget class="QLabel" name="versionLabel">
+       <property name="text">
         <string>Versions of File</string>
        </property>
-       <property name="alignment" >
+       <property name="alignment">
         <set>Qt::AlignCenter</set>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QLabel" name="versionFileLabel" >
-       <property name="text" >
+      <widget class="QLabel" name="versionFileLabel">
+       <property name="text">
         <string>FileName</string>
        </property>
-       <property name="alignment" >
+       <property name="alignment">
         <set>Qt::AlignCenter</set>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QTableWidget" name="versionTable" />
+      <widget class="QTableWidget" name="versionTable"/>
      </item>
     </layout>
    </widget>
   </widget>
-  <widget class="QWidget" native="1" name="widget" >
-   <property name="geometry" >
+  <widget class="QWidget" name="widget" native="true">
+   <property name="geometry">
     <rect>
      <x>20</x>
      <y>59</y>
      <height>95</height>
     </rect>
    </property>
-   <property name="maximumSize" >
+   <property name="maximumSize">
     <size>
      <width>900</width>
      <height>95</height>
     </size>
    </property>
-   <layout class="QGridLayout" >
-    <property name="margin" >
+   <layout class="QGridLayout">
+    <property name="margin">
      <number>3</number>
     </property>
-    <property name="spacing" >
+    <property name="spacing">
      <number>2</number>
     </property>
-    <item row="1" column="0" >
-     <layout class="QHBoxLayout" >
-      <property name="margin" >
-       <number>2</number>
-      </property>
-      <property name="spacing" >
+    <item row="1" column="0">
+     <layout class="QHBoxLayout">
+      <property name="spacing">
        <number>4</number>
       </property>
+      <property name="margin">
+       <number>2</number>
+      </property>
       <item>
-       <layout class="QGridLayout" >
-        <property name="margin" >
+       <layout class="QGridLayout">
+        <property name="margin">
          <number>2</number>
         </property>
-        <property name="spacing" >
+        <property name="spacing">
          <number>3</number>
         </property>
-        <item row="0" column="0" >
-         <widget class="QPushButton" name="refreshButton" >
-          <property name="text" >
+        <item row="0" column="0">
+         <widget class="QPushButton" name="refreshButton">
+          <property name="text">
            <string>Refresh</string>
           </property>
-          <property name="icon" >
-           <iconset resource="../main.qrc" >:/images/view-refresh.png</iconset>
+          <property name="icon">
+           <iconset resource="../main.qrc">
+            <normaloff>:/images/view-refresh.png</normaloff>:/images/view-refresh.png</iconset>
           </property>
          </widget>
         </item>
-        <item row="1" column="0" colspan="2" >
-         <widget class="QLabel" name="refreshLabel" >
-          <property name="text" >
+        <item row="1" column="0" colspan="2">
+         <widget class="QLabel" name="refreshLabel">
+          <property name="text">
            <string>TextLabel</string>
           </property>
          </widget>
         </item>
-        <item row="0" column="1" >
-         <widget class="QPushButton" name="restoreButton" >
-          <property name="text" >
+        <item row="0" column="1">
+         <widget class="QPushButton" name="restoreButton">
+          <property name="text">
            <string>Restore</string>
           </property>
-          <property name="icon" >
-           <iconset resource="../main.qrc" >:/images/restore.png</iconset>
+          <property name="icon">
+           <iconset resource="../main.qrc">
+            <normaloff>:/images/restore.png</normaloff>:/images/restore.png</iconset>
           </property>
          </widget>
         </item>
        </layout>
       </item>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="margin" >
-         <number>2</number>
-        </property>
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>3</number>
         </property>
+        <property name="margin">
+         <number>2</number>
+        </property>
         <item>
-         <widget class="QLabel" name="jobLabel" >
-          <property name="text" >
+         <widget class="QLabel" name="jobLabel">
+          <property name="text">
            <string>Job</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="jobCombo" >
-          <property name="sizePolicy" >
-           <sizepolicy>
-            <hsizetype>7</hsizetype>
-            <vsizetype>0</vsizetype>
+         <widget class="QComboBox" name="jobCombo">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
             <horstretch>0</horstretch>
             <verstretch>0</verstretch>
            </sizepolicy>
           </property>
-          <property name="toolTip" >
+          <property name="toolTip">
            <string>Job List Job Criterion Selector</string>
           </property>
-          <property name="statusTip" >
+          <property name="statusTip">
            <string>Job List Job Criterion Selector</string>
           </property>
          </widget>
        </layout>
       </item>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="margin" >
-         <number>2</number>
-        </property>
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>3</number>
         </property>
+        <property name="margin">
+         <number>2</number>
+        </property>
         <item>
-         <widget class="QLabel" name="clientLabel" >
-          <property name="text" >
+         <widget class="QLabel" name="clientLabel">
+          <property name="text">
            <string>Client</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="clientCombo" >
-          <property name="sizePolicy" >
-           <sizepolicy>
-            <hsizetype>7</hsizetype>
-            <vsizetype>0</vsizetype>
+         <widget class="QComboBox" name="clientCombo">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
             <horstretch>0</horstretch>
             <verstretch>0</verstretch>
            </sizepolicy>
           </property>
-          <property name="toolTip" >
+          <property name="toolTip">
            <string>Job List Client Criterion Selector</string>
           </property>
-          <property name="statusTip" >
+          <property name="statusTip">
            <string>Job List Client Criterion Selector</string>
           </property>
          </widget>
        </layout>
       </item>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="margin" >
-         <number>2</number>
-        </property>
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>3</number>
         </property>
+        <property name="margin">
+         <number>2</number>
+        </property>
         <item>
-         <widget class="QLabel" name="fileSetLabel" >
-          <property name="text" >
+         <widget class="QLabel" name="fileSetLabel">
+          <property name="text">
            <string>FileSet</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="fileSetCombo" >
-          <property name="sizePolicy" >
-           <sizepolicy>
-            <hsizetype>7</hsizetype>
-            <vsizetype>0</vsizetype>
+         <widget class="QComboBox" name="fileSetCombo">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
             <horstretch>0</horstretch>
             <verstretch>0</verstretch>
            </sizepolicy>
           </property>
-          <property name="toolTip" >
+          <property name="toolTip">
            <string>Job List Fileset Criterion Selector</string>
           </property>
-          <property name="statusTip" >
+          <property name="statusTip">
            <string>Job List Fileset Criterion Selector</string>
           </property>
          </widget>
        </layout>
       </item>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="margin" >
-         <number>2</number>
-        </property>
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>3</number>
         </property>
+        <property name="margin">
+         <number>2</number>
+        </property>
         <item>
-         <widget class="QCheckBox" name="limitCheckBox" >
-          <property name="text" >
+         <widget class="QCheckBox" name="limitCheckBox">
+          <property name="text">
            <string>Record Limit</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QSpinBox" name="limitSpinBox" >
-          <property name="maximum" >
-           <number>10000</number>
-          </property>
-          <property name="minimum" >
+         <widget class="QSpinBox" name="limitSpinBox">
+          <property name="minimum">
            <number>1</number>
           </property>
-          <property name="singleStep" >
+          <property name="maximum">
+           <number>10000</number>
+          </property>
+          <property name="singleStep">
            <number>25</number>
           </property>
          </widget>
        </layout>
       </item>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="margin" >
-         <number>2</number>
-        </property>
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>3</number>
         </property>
+        <property name="margin">
+         <number>2</number>
+        </property>
         <item>
-         <widget class="QCheckBox" name="daysCheckBox" >
-          <property name="text" >
+         <widget class="QCheckBox" name="daysCheckBox">
+          <property name="text">
            <string>Days Limit</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QSpinBox" name="daysSpinBox" >
-          <property name="singleStep" >
+         <widget class="QSpinBox" name="daysSpinBox">
+          <property name="singleStep">
            <number>7</number>
           </property>
          </widget>
       </item>
      </layout>
     </item>
-    <item row="0" column="0" >
-     <widget class="QLabel" name="directoryLabel" >
-      <property name="sizePolicy" >
-       <sizepolicy>
-        <hsizetype>5</hsizetype>
-        <vsizetype>0</vsizetype>
+    <item row="0" column="0">
+     <widget class="QLabel" name="directoryLabel">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
         <horstretch>0</horstretch>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
-      <property name="cursor" >
-       <cursor>13</cursor>
+      <property name="cursor">
+       <cursorShape>PointingHandCursor</cursorShape>
       </property>
-      <property name="text" >
+      <property name="text">
        <string>Directory</string>
       </property>
      </widget>
     </item>
    </layout>
   </widget>
-  <action name="actionSelectDirectory" >
-   <property name="icon" >
-    <iconset/>
+  <action name="actionSelectDirectory">
+   <property name="icon">
+    <iconset>
+     <normaloff/>
+    </iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>Select Directory</string>
    </property>
   </action>
-  <action name="actionUnselectDirectory" >
-   <property name="icon" >
-    <iconset/>
+  <action name="actionUnselectDirectory">
+   <property name="icon">
+    <iconset>
+     <normaloff/>
+    </iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>UnselectDirectory</string>
    </property>
   </action>
  </widget>
  <resources>
-  <include location="../main.qrc" />
+  <include location="../main.qrc"/>
  </resources>
  <connections/>
 </ui>
index ccba96117762b0bd46d378cd14204fc8437ee6c8..3a1ba5bd67c917ffc28ec2aac2203466ab794064 100644 (file)
@@ -277,7 +277,7 @@ void ClientStat::readSettings()
    m_splitText = "splitterSizes_1";
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup(m_groupText);
-   splitter->restoreState(settings.value(m_splitText).toByteArray());
+   if (settings.contains(m_splitText)) { splitter->restoreState(settings.value(m_splitText).toByteArray()); }
    spinBox->setValue(settings.value("refreshInterval", 28).toInt());
    checkBox->setCheckState((Qt::CheckState)settings.value("refreshCheck", Qt::Checked).toInt());
    settings.endGroup();
index 54913d40fcecd26d91c4cb5ba42224308fa6e967..a4d05860f3570d4538c11fe2b0a7b696c9f59efc 100644 (file)
@@ -345,7 +345,7 @@ void DirStat::readSettings()
    m_splitText = "splitterSizes_0";
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup(m_groupText);
-   splitter->restoreState(settings.value(m_splitText).toByteArray());
+   if (settings.contains(m_splitText)) { splitter->restoreState(settings.value(m_splitText).toByteArray()); }
    spinBox->setValue(settings.value("refreshInterval", 28).toInt());
    checkBox->setCheckState((Qt::CheckState)settings.value("refreshCheck", Qt::Checked).toInt());
    settings.endGroup();
index 0d2f7bb49787cfae328000851e14e75e10b7a866..a6a6e7df10059fb1aea569d69603ca63fee35cf8 100644 (file)
@@ -349,7 +349,7 @@ void StorStat::readSettings()
    m_splitText = "splitterSizes_0";
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup(m_groupText);
-   splitter->restoreState(settings.value(m_splitText).toByteArray());
+   if (settings.contains(m_splitText)) { splitter->restoreState(settings.value(m_splitText).toByteArray()); }
    spinBox->setValue(settings.value("refreshInterval", 28).toInt());
    checkBox->setCheckState((Qt::CheckState)settings.value("refreshCheck", Qt::Checked).toInt());
    settings.endGroup();