]> git.sur5r.net Git - bacula/bacula/commitdiff
Have m_dtformat be a member of mainwin only. m_dtformat is a QString which is
authorDirk H Bartley <dbartley@schupan.com>
Sun, 20 May 2007 02:14:48 +0000 (02:14 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Sun, 20 May 2007 02:14:48 +0000 (02:14 +0000)
used in date/time entry boxes to set the format for appearance and for
converting to and from a string.

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

bacula/src/qt-console/TODO
bacula/src/qt-console/restore/prerestore.cpp
bacula/src/qt-console/restore/restore.h
bacula/src/qt-console/run/run.h
bacula/src/qt-console/run/runcmd.cpp

index 31857521ec2c588262d83e0591c2667ad4b7e068..c8dd24af34a835d27b2ed003bcefc84596ba7a02 100644 (file)
@@ -2,9 +2,8 @@ dhb
 ====================================================
 joblist cancel a running job.
 
-Set default for replace in run restore job to "always"??????
-
 Fixes to final restore widgets.
+   all but messages done.
 
 Add context sensitive options for most commands
 status dir on page select director item
@@ -41,6 +40,8 @@ similar to what the first restore window does.
 
 A window showing a list of schedule resources. 
 
+A list of message resources??
+
 Kern discussed windows showing statistics like web based interfaces.
 ========================================================
 Future Releases :
@@ -75,6 +76,8 @@ global one defined in the mainWin class (if I remember right).
 ============================================================
 DONE:
 ============================================================
+Set default for replace in run restore job to "always"??????
+
 Option in joblist like with restore from jobid but restore populating timestamp
 of the selected job.
 
index 9b065762a33449119f331a5404d90691ea99f33a..d399cd50c6d152c55ef899d1d0c191c061823ed0 100644 (file)
@@ -59,7 +59,6 @@ prerestorePage::prerestorePage()
  */
 void prerestorePage::buildPage()
 {
-   m_dtformat = "yyyy-MM-dd HH:mm:ss";
    m_name = "Restore";
    setupUi(this);
    pgInitialize();
@@ -77,7 +76,7 @@ void prerestorePage::buildPage()
    storageCombo->addItems(m_console->storage_list);
    /* current or before . .  Start out with current checked */
    recentCheckBox->setCheckState(Qt::Checked);
-   beforeDateTime->setDisplayFormat(m_dtformat);
+   beforeDateTime->setDisplayFormat(mainWin->m_dtformat);
    beforeDateTime->setDateTime(QDateTime::currentDateTime());
    beforeDateTime->setEnabled(false);
    selectFilesRadio->setChecked(true);
@@ -109,7 +108,7 @@ void prerestorePage::buildPage()
          filesetCombo->setCurrentIndex(filesetCombo->findText(fieldlist[2], Qt::MatchExactly));
          clientCombo->setCurrentIndex(clientCombo->findText(fieldlist[1], Qt::MatchExactly));
          jobCombo->setCurrentIndex(jobCombo->findText(fieldlist[0], Qt::MatchExactly));
-         beforeDateTime->setDateTime(QDateTime::fromString(fieldlist[3], m_dtformat));
+         beforeDateTime->setDateTime(QDateTime::fromString(fieldlist[3], mainWin->m_dtformat));
      }
    }
    job_name_change(0);
@@ -153,7 +152,7 @@ void prerestorePage::okButtonPushed()
          cmd += " current";
       } else {
          QDateTime stamp = beforeDateTime->dateTime();
-         QString before = stamp.toString(m_dtformat);
+         QString before = stamp.toString(mainWin->m_dtformat);
          cmd += " before=\"" + before + "\"";
       }
    } else {
index af5619660d8df41e9d6b83328d71f750fe2eced8..debbc99368c633d7405bdc7ae4342760fc580453 100644 (file)
@@ -71,7 +71,6 @@ private:
    int jobdefsFromJob(QStringList &, QString &);
    void buildPage();
    bool checkJobIdList();
-   QString m_dtformat;
    QString m_dataIn;
    unsigned int m_dataInType;
 };
index ec55c726eae1604a767100c44a1f0efe8a7538d5..9a8796aba867dfb22c0cf9fa6fa3a1da10ea385b 100644 (file)
@@ -35,7 +35,6 @@ public slots:
 
 private:
    void fill();
-   QString m_dtformat;
 };
 
 
index a96692e4da3f4cfe10176e8ad0d39f91db26e10e..5c471efe647dda617bf17d6168cb2f5b95f40650 100644 (file)
@@ -48,7 +48,6 @@
  */
 runCmdPage::runCmdPage()
 {
-   m_dtformat = "yyyy-MM-dd HH:mm:ss";
    m_name = "Restore Run";
    pgInitialize();
    setupUi(this);
@@ -76,7 +75,7 @@ void runCmdPage::fill()
    replaceCombo->addItems(QStringList() << "never" << "always" << "ifnewer" << "ifolder");
    replaceCombo->setCurrentIndex(replaceCombo->findText("never", Qt::MatchExactly));
    storageCombo->addItems(m_console->storage_list);
-   dateTimeEdit->setDisplayFormat(m_dtformat);
+   dateTimeEdit->setDisplayFormat(mainWin->m_dtformat);
 
    m_console->read();
    item = m_console->msg();
@@ -111,7 +110,7 @@ void runCmdPage::fill()
          continue;
       }
       if (item.startsWith("When:")) {
-         dateTimeEdit->setDateTime(QDateTime::fromString(val,m_dtformat));
+         dateTimeEdit->setDateTime(QDateTime::fromString(val,mainWin->m_dtformat));
          continue;
       }
       if (item.startsWith("Catalog:")) {
@@ -145,7 +144,7 @@ void runCmdPage::okButtonPushed()
    cmd += " fileset=\"" + filesetCombo->currentText() + "\"";
    cmd += " storage=\"" + storageCombo->currentText() + "\"";
    cmd += " replace=\"" + replaceCombo->currentText() + "\"";
-   cmd += " when=\"" + dateTimeEdit->dateTime().toString(m_dtformat) + "\"";
+   cmd += " when=\"" + dateTimeEdit->dateTime().toString(mainWin->m_dtformat) + "\"";
    cmd += " bootstrap=\"" + bootstrap->text() + "\"";
    cmd += " where=\"" + where->text() + "\"";
    QString pri;