From: Dirk H Bartley Date: Sun, 20 May 2007 02:14:48 +0000 (+0000) Subject: Have m_dtformat be a member of mainwin only. m_dtformat is a QString which is X-Git-Tag: Release-7.0.0~6300 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a2f09aaba4c8e3463014ff3153587ae6294916a5;p=bacula%2Fbacula Have m_dtformat be a member of mainwin only. m_dtformat is a QString which is 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 --- diff --git a/bacula/src/qt-console/TODO b/bacula/src/qt-console/TODO index 31857521ec..c8dd24af34 100644 --- a/bacula/src/qt-console/TODO +++ b/bacula/src/qt-console/TODO @@ -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. diff --git a/bacula/src/qt-console/restore/prerestore.cpp b/bacula/src/qt-console/restore/prerestore.cpp index 9b065762a3..d399cd50c6 100644 --- a/bacula/src/qt-console/restore/prerestore.cpp +++ b/bacula/src/qt-console/restore/prerestore.cpp @@ -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 { diff --git a/bacula/src/qt-console/restore/restore.h b/bacula/src/qt-console/restore/restore.h index af5619660d..debbc99368 100644 --- a/bacula/src/qt-console/restore/restore.h +++ b/bacula/src/qt-console/restore/restore.h @@ -71,7 +71,6 @@ private: int jobdefsFromJob(QStringList &, QString &); void buildPage(); bool checkJobIdList(); - QString m_dtformat; QString m_dataIn; unsigned int m_dataInType; }; diff --git a/bacula/src/qt-console/run/run.h b/bacula/src/qt-console/run/run.h index ec55c726ea..9a8796aba8 100644 --- a/bacula/src/qt-console/run/run.h +++ b/bacula/src/qt-console/run/run.h @@ -35,7 +35,6 @@ public slots: private: void fill(); - QString m_dtformat; }; diff --git a/bacula/src/qt-console/run/runcmd.cpp b/bacula/src/qt-console/run/runcmd.cpp index a96692e4da..5c471efe64 100644 --- a/bacula/src/qt-console/run/runcmd.cpp +++ b/bacula/src/qt-console/run/runcmd.cpp @@ -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;