| 1 | /* ---------------------------------- manage.cpp --------------------------------------------------------------------------- |
| 2 | Class to display the manage backups dialog |
| 3 | |
| 4 | =============================================================================================================================== |
| 5 | =============================================================================================================================== |
| 6 | This file is part of "luckyBackup" project |
| 7 | Copyright, Loukas Avgeriou |
| 8 | luckyBackup is distributed under the terms of the GNU General Public License |
| 9 | luckyBackup is free software: you can redistribute it and/or modify |
| 10 | it under the terms of the GNU General Public License as published by |
| 11 | the Free Software Foundation, either version 3 of the License, or |
| 12 | (at your option) any later version. |
| 13 | |
| 14 | luckyBackup is distributed in the hope that it will be useful, |
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU General Public License for more details. |
| 18 | |
| 19 | You should have received a copy of the GNU General Public License |
| 20 | along with luckyBackup. If not, see <http://www.gnu.org/licenses/>. |
| 21 | |
| 22 | project version : Please see "main.cpp" for project version |
| 23 | |
| 24 | developer : luckyb |
| 25 | last modified : 22 May 2016 |
| 26 | =============================================================================================================================== |
| 27 | =============================================================================================================================== |
| 28 | */ |
| 29 | #include "manage.h"cxx . . $ `<file>/src/manage.h`/ |
| 30 | |
| 31 | #include <QCloseEvent> |
| 32 | #include <QDirModel> |
| 33 | |
| 34 | #include "RsyncDirModel.h"cxx . . $ `<file>/src/RsyncDirModel.h`/ |
| 35 | #include "calcDiffThread.h"cxx . . $ `<file>/src/calcDiffThread.h`/ |
| 36 | #include "global.h"cxx . . $ `<file>/src/global.h`/ |
| 37 | #include "logDialog.h"cxx . . $ `<file>/src/logDialog.h`/ |
| 38 | #include "manageWizard.h"cxx . . $ `<file>/src/manageWizard.h`/ |
| 39 | #include "operationClass.h"cxx . . $ `<file>/src/operationClass.h`/ |
| 40 | |
| 41 | // class manageDialog Constructor================================================================================================= |
| 42 | // Displays the manage backups of a task dialog |
| 43 | manageDialogcxx . . $ manageDialog#::manageDialogcxx . . $ manageDialog#manageDialog(d194de0c0f68c28b). (QDialogcxx . . $ QDialog# *parent) : QDialogcxx . . $ QDialog#QDialog(872e7b0c281abd8d). (parent) |
| 44 | { |
| 45 | // initialize variables |
| 46 | CurrentSnapshotStringcxx . . $ manageDialog#CurrentSnapshotString. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 47 | CurrentSnapshotDirectorycxx . . $ manageDialog#CurrentSnapshotDirectory. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 48 | CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo. = 0; |
| 49 | |
| 50 | //first set string variables source, dest |
| 51 | QStringListcxx . . $ QStringList# arguments = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetArgscxx . . $ operation#GetArgs(e1dbd5c4feadc8f5).(); |
| 52 | sourcecxx . . $ manageDialog#source. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). arguments[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).arguments.sizecxx . . $ QList#size(ea6fe5115c70a13f).()-2]; |
| 53 | destcxx . . $ manageDialog#dest. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). arguments[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).arguments.sizecxx . . $ QList#size(ea6fe5115c70a13f).()-1]; |
| 54 | sourceLastcxx . . $ manageDialog#sourceLast. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 55 | |
| 56 | //fix source and dest |
| 57 | if (!sourcecxx . . $ manageDialog#source..endsWithcxx . . $ QString#endsWith(8cce4688c16f48f3).(SLASHcxx . . $ Global/SLASH.)) // this means task is of type "backup dir by name" |
| 58 | { |
| 59 | sourceLastcxx . . $ manageDialog#sourceLast. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). calculateLastPathcxx . . $ Global/calculateLastPath(f7f320d754b8fd09).(sourcecxx . . $ QString#QString(132dd6869045752b).); // This is the lowest dir of the source |
| 60 | |
| 61 | sourcecxx . . $ manageDialog#source..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(SLASHcxx . . $ Global/SLASH.); |
| 62 | |
| 63 | if (WINrunningcxx . . $ Global/WINrunning. && Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemotecxx . . $ operation#GetRemote(50ce9a9e25b4a850).()) |
| 64 | { |
| 65 | sourceLastcxx . . $ manageDialog#sourceLast..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(XnixSLASHcxx . . $ Global/XnixSLASH.); |
| 66 | destcxx . . $ manageDialog#dest..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(sourceLastcxx . . $ manageDialog#sourceLast.); |
| 67 | if (destcxx . . $ manageDialog#dest..endsWithcxx . . $ QString#endsWith(8cce4688c16f48f3).(XnixSLASHcxx . . $ Global/XnixSLASH.+cxx . . $ operator+(fab9b4f80031f353).XnixSLASHcxx . . $ Global/XnixSLASH.)) |
| 68 | destcxx . . $ manageDialog#dest..chopcxx . . $ QString#chop(d4f767463ce0a6b3).(1); |
| 69 | } |
| 70 | else |
| 71 | { |
| 72 | sourceLastcxx . . $ manageDialog#sourceLast..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(SLASHcxx . . $ Global/SLASH.); |
| 73 | destcxx . . $ manageDialog#dest..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(sourceLastcxx . . $ manageDialog#sourceLast.); |
| 74 | if (destcxx . . $ manageDialog#dest..endsWithcxx . . $ QString#endsWith(8cce4688c16f48f3).(SLASHcxx . . $ Global/SLASH.+cxx . . $ operator+(fab9b4f80031f353).SLASHcxx . . $ Global/SLASH.)) |
| 75 | destcxx . . $ manageDialog#dest..chopcxx . . $ QString#chop(d4f767463ce0a6b3).(1); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | uiGcxx . . $ manageDialog#uiG..setupUicxx . . $ Ui_manageDialog#setupUi(d194de0c0f68c28b).(this); |
| 80 | |
| 81 | calcdiffthreadcxx . . $ manageDialog#calcdiffthread. = new CalcDiffThreadcxx . . $ CalcDiffThread#CalcDiffThread(749de1b6ae65bddd).(this); |
| 82 | abortCalcThreadcxx . . $ manageDialog#abortCalcThread. = false; |
| 83 | connectcxx . . $ QObject#connect(158df1d9a01a3410).( calcdiffthreadcxx . . $ manageDialog#calcdiffthread., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(updateViewer(const QString, const bool)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(refreshDifWindow(const QString &, const bool &)) ); |
| 84 | connectcxx . . $ QObject#connect(158df1d9a01a3410).( calcdiffthreadcxx . . $ manageDialog#calcdiffthread., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(terminated()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(calcDiffEnd())); |
| 85 | connectcxx . . $ QObject#connect(158df1d9a01a3410).( calcdiffthreadcxx . . $ manageDialog#calcdiffthread., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(finished()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(calcDiffEnd())); |
| 86 | |
| 87 | //connect pushButton SLOTs ---------------- |
| 88 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uiGcxx . . $ manageDialog#uiG..pushButton_cancelcxx . . $ Ui_manageDialog#pushButton_cancel., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( cancel() ) ); |
| 89 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uiGcxx . . $ manageDialog#uiG..pushButton_viewLogcxx . . $ Ui_manageDialog#pushButton_viewLog., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( logView() ) ); |
| 90 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uiGcxx . . $ manageDialog#uiG..pushButton_restorecxx . . $ Ui_manageDialog#pushButton_restore., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( restoreBackup() ) ); |
| 91 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uiGcxx . . $ manageDialog#uiG..pushButton_deletecxx . . $ Ui_manageDialog#pushButton_delete., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( deleteBackup() ) ); |
| 92 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uiGcxx . . $ manageDialog#uiG..checkBox_viewSourcecxx . . $ Ui_manageDialog#checkBox_viewSource., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( hideSourceStuff() ) ); |
| 93 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uiGcxx . . $ manageDialog#uiG..listWidget_datescxx . . $ Ui_manageDialog#listWidget_dates., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( itemSelectionChanged() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( SnapshotsListSelected() ) ); |
| 94 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uiGcxx . . $ manageDialog#uiG..pushButton_calculate_diffscxx . . $ Ui_manageDialog#pushButton_calculate_diffs., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`! ( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`! ( calculateDifferences() ) ); |
| 95 | |
| 96 | |
| 97 | //____________________Initial gui changes (these will remain the same for as long as the gui is visible)_______________ |
| 98 | |
| 99 | // set the text to labels profile & task |
| 100 | uiGcxx . . $ manageDialog#uiG..label_profilecxx . . $ Ui_manageDialog#label_profile. -> setTextcxx . . $ QLabel#setText(3520e46b33348bf6). (trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("profile")+cxx . . $ operator+(3d22f08efddf8107). ": <font color = blue><b>" +cxx . . $ operator+(fab9b4f80031f353).profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b></font>"); |
| 101 | uiGcxx . . $ manageDialog#uiG..label_taskcxx . . $ Ui_manageDialog#label_task. -> setTextcxx . . $ QLabel#setText(3520e46b33348bf6). (trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("task") +cxx . . $ operator+(3d22f08efddf8107). ": <font color = blue><b>" +cxx . . $ operator+(fab9b4f80031f353). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107). "</b></font>"); |
| 102 | |
| 103 | //resize the treeview headers |
| 104 | uiGcxx . . $ manageDialog#uiG..treeView_browsercxx . . $ Ui_manageDialog#treeView_browser. -> headercxx . . $ QTreeView#header(f0c0fe1a435d30ff).() -> resizeSectioncxx . . $ QHeaderView#resizeSection(3e454b8ccf442868).(0,230); |
| 105 | uiGcxx . . $ manageDialog#uiG..treeView_sourcecxx . . $ Ui_manageDialog#treeView_source. -> headercxx . . $ QTreeView#header(f0c0fe1a435d30ff).() -> resizeSectioncxx . . $ QHeaderView#resizeSection(3e454b8ccf442868).(0,230); |
| 106 | uiGcxx . . $ manageDialog#uiG..treeView_browsercxx . . $ Ui_manageDialog#treeView_browser. -> headercxx . . $ QTreeView#header(f0c0fe1a435d30ff).() -> resizeSectioncxx . . $ QHeaderView#resizeSection(3e454b8ccf442868).(1,80); |
| 107 | uiGcxx . . $ manageDialog#uiG..treeView_sourcecxx . . $ Ui_manageDialog#treeView_source. -> headercxx . . $ QTreeView#header(f0c0fe1a435d30ff).() -> resizeSectioncxx . . $ QHeaderView#resizeSection(3e454b8ccf442868).(1,80); |
| 108 | uiGcxx . . $ manageDialog#uiG..treeView_browsercxx . . $ Ui_manageDialog#treeView_browser. -> headercxx . . $ QTreeView#header(f0c0fe1a435d30ff).() -> resizeSectioncxx . . $ QHeaderView#resizeSection(3e454b8ccf442868).(2,60); |
| 109 | uiGcxx . . $ manageDialog#uiG..treeView_sourcecxx . . $ Ui_manageDialog#treeView_source. -> headercxx . . $ QTreeView#header(f0c0fe1a435d30ff).() -> resizeSectioncxx . . $ QHeaderView#resizeSection(3e454b8ccf442868).(2,60); |
| 110 | uiGcxx . . $ manageDialog#uiG..treeView_browsercxx . . $ Ui_manageDialog#treeView_browser. -> headercxx . . $ QTreeView#header(f0c0fe1a435d30ff).() -> resizeSectioncxx . . $ QHeaderView#resizeSection(3e454b8ccf442868).(3,100); |
| 111 | uiGcxx . . $ manageDialog#uiG..treeView_sourcecxx . . $ Ui_manageDialog#treeView_source. -> headercxx . . $ QTreeView#header(f0c0fe1a435d30ff).() -> resizeSectioncxx . . $ QHeaderView#resizeSection(3e454b8ccf442868).(3,100); |
| 112 | |
| 113 | // Set the lineEdits source & dest with real paths |
| 114 | uiGcxx . . $ manageDialog#uiG..lineEdit_destinationcxx . . $ Ui_manageDialog#lineEdit_destination. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(destcxx . . $ manageDialog#dest.); |
| 115 | uiGcxx . . $ manageDialog#uiG..lineEdit_sourcecxx . . $ Ui_manageDialog#lineEdit_source. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(sourcecxx . . $ manageDialog#source.); |
| 116 | |
| 117 | (uiGcxx . . $ manageDialog#uiG..textBrowser_snapshotcxx . . $ Ui_manageDialog#textBrowser_snapshot.->documentcxx . . $ QTextEdit#document(f21741221844491e).())->setMaximumBlockCountcxx . . $ QTextDocument#setMaximumBlockCount(d4f767463ce0a6b3).(50000); // set maximum blocks to avoid freeze |
| 118 | |
| 119 | updateSnapshotscxx . . $ manageDialog#updateSnapshots(49f6e7a06ebc5aa8).(); // update the snapshots listWidget |
| 120 | SnapshotsListSelectedcxx . . $ manageDialog#SnapshotsListSelected(49f6e7a06ebc5aa8).(); //set currentSnapshotString & No. Will also call fixGui() |
| 121 | } |
| 122 | // SLOTS------------------------------------------------------------------------------------- |
| 123 | // --------------------------------cancel pressed------------------------------------------------ |
| 124 | void manageDialogcxx . . $ manageDialog#::cancelcxx . . $ manageDialog#cancel(49f6e7a06ebc5aa8).() |
| 125 | { |
| 126 | closecxx . . $ QWidget#close(c9857a73d68e59ba).(); |
| 127 | } |
| 128 | |
| 129 | //do the same if the main window close button (or alt+F4) is pressed |
| 130 | void manageDialogcxx . . $ manageDialog#::closeEventcxx . . $ manageDialog#closeEvent(642e80679aeb34f8).(QCloseEventcxx . . $ QCloseEvent# *event) |
| 131 | { |
| 132 | // do not close the window if a calc thread is still running |
| 133 | if (calcdiffthreadcxx . . $ manageDialog#calcdiffthread.->isRunningcxx . . $ QThread#isRunning(50ce9a9e25b4a850).()) |
| 134 | event->ignorecxx . . $ QEvent#ignore(49f6e7a06ebc5aa8).(); |
| 135 | } |
| 136 | |
| 137 | // SLOT logView ===================================================================================================================== |
| 138 | // Display the logfile |
| 139 | void manageDialogcxx . . $ manageDialog#::logViewcxx . . $ manageDialog#logView(49f6e7a06ebc5aa8).() |
| 140 | { |
| 141 | QUrlcxx . . $ QUrl# logURLcxx . . $ QUrl#QUrl(49f6e7a06ebc5aa8).; |
| 142 | logURL.setSchemecxx . . $ QUrl#setScheme(3520e46b33348bf6).("file"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 143 | logURL.setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).("Does_not_exist"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 144 | |
| 145 | //extract the logfilename from the dates listwidget |
| 146 | logfilenamecxx . . $ Global/logfilename. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). CurrentSnapshotStringcxx . . $ manageDialog#CurrentSnapshotString.; |
| 147 | logfilenamecxx . . $ Global/logfilename..prependcxx . . $ QString#prepend(6a89d0b7f4d2681c).(logDircxx . . $ Global/logDir. +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "-" +cxx . . $ operator+(fab9b4f80031f353). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107). "-"); |
| 148 | logfilenamecxx . . $ Global/logfilename..appendcxx . . $ QString#append(d02845eef0c33901).(".log"); |
| 149 | |
| 150 | logfilecxx . . $ Global/logfile..setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(logfilenamecxx . . $ Global/logfilename.); // this is the logfile of the item selected |
| 151 | if (logfilecxx . . $ Global/logfile..existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the logfile exists |
| 152 | logURL.setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).(logfilenamecxx . . $ Global/logfilename.); |
| 153 | |
| 154 | logDialogcxx . . $ logDialog# logdialogcxx . . $ logDialog#logDialog(f0ccea2e72bcf7e0). (logURLcxx . . $ QUrl#QUrl(37355d2f77053a23).); |
| 155 | logdialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 156 | } |
| 157 | |
| 158 | // SLOT restoreBackup ===================================================================================================================== |
| 159 | // launch the restore wizard |
| 160 | void manageDialogcxx . . $ manageDialog#::restoreBackupcxx . . $ manageDialog#restoreBackup(49f6e7a06ebc5aa8).() |
| 161 | { |
| 162 | manageWizardcxx . . $ manageWizard# restoreWizardcxx . . $ manageWizard#manageWizard(53ba369086eed9c2).("restoreBackup"cxx . . $ QString#QString(85c52e162fed56f9)., sourcecxx . . $ QString#QString(132dd6869045752b)., destcxx . . $ QString#QString(132dd6869045752b)., CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo.); //pass the number of the current row |
| 163 | restoreWizard.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 164 | |
| 165 | fixGuicxx . . $ manageDialog#fixGui(49f6e7a06ebc5aa8).(); // update the gui with new dirs data |
| 166 | } |
| 167 | |
| 168 | // SLOT deleteBackup ===================================================================================================================== |
| 169 | // Launch the delete backup wizard |
| 170 | void manageDialogcxx . . $ manageDialog#::deleteBackupcxx . . $ manageDialog#deleteBackup(49f6e7a06ebc5aa8).() |
| 171 | { |
| 172 | |
| 173 | // launch the delete backup wizard |
| 174 | manageWizardcxx . . $ manageWizard# deleteWizardcxx . . $ manageWizard#manageWizard(53ba369086eed9c2).("deleteBackup"cxx . . $ QString#QString(85c52e162fed56f9)., sourcecxx . . $ QString#QString(132dd6869045752b)., destcxx . . $ QString#QString(132dd6869045752b)., CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo.); |
| 175 | deleteWizard.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 176 | |
| 177 | updateSnapshotscxx . . $ manageDialog#updateSnapshots(49f6e7a06ebc5aa8).(); // update the snapshots listwidget |
| 178 | SnapshotsListSelectedcxx . . $ manageDialog#SnapshotsListSelected(49f6e7a06ebc5aa8).(); // set a new currentSnapshot and update the gui |
| 179 | } |
| 180 | |
| 181 | // fixGui ===================================================================================================================== |
| 182 | // makes some changes to the gui according to various stuff to make it prettier !! |
| 183 | // also update treebrowsers with new snapshot data |
| 184 | void manageDialogcxx . . $ manageDialog#::fixGuicxx . . $ manageDialog#fixGui(49f6e7a06ebc5aa8).() |
| 185 | { |
| 186 | // these will become false if dest or source treebrowsers are to be hidden |
| 187 | bool destVisible = true; |
| 188 | sourceVisiblecxx . . $ manageDialog#sourceVisible. = true; |
| 189 | |
| 190 | //Thesw will become false if relevant pushButtons have to be disabled |
| 191 | viewLogVisiblecxx . . $ manageDialog#viewLogVisible. = true; |
| 192 | deleteVisiblecxx . . $ manageDialog#deleteVisible. = true; |
| 193 | restoreVisiblecxx . . $ manageDialog#restoreVisible. = true; |
| 194 | |
| 195 | syncTYPEcxx . . $ manageDialog#syncTYPE. = false; // This will become true if it is a sync task |
| 196 | |
| 197 | // Destination - Do all things needed to display the current snapshot only. |
| 198 | QDircxx . . $ QDir# CurrentSnapshotDircxx . . $ QDir#QDir(3520e46b33348bf6).(CurrentSnapshotDirectorycxx . . $ manageDialog#CurrentSnapshotDirectory.); |
| 199 | |
| 200 | // set the model of the treebrowsers (source & destination) sort by name & refresh to use new source & dest |
| 201 | //destination |
| 202 | QDirModelcxx . . $ QDirModel# *d_model = new QDirModelcxx . . $ QDirModel#; |
| 203 | |
| 204 | //d_model -> setFilter(QDir::AllDirs | QDir::NoDotAndDotDot | QDir::AllEntries | QDir::Hidden); |
| 205 | //d_model -> setSorting(QDir::Name | QDir::DirsFirst | QDir::IgnoreCase | QDir::LocaleAware); |
| 206 | |
| 207 | //uiG.treeView_browser -> setModel(d_model); |
| 208 | //uiG.treeView_browser -> sortByColumn (0, Qt::AscendingOrder); |
| 209 | //if (CurrentSnapshotDir.exists()) |
| 210 | // uiG.treeView_browser -> setRootIndex(d_model->index(CurrentSnapshotDirectory)); |
| 211 | //else |
| 212 | |
| 213 | //uiG.treeView_browser -> setRootIndex(d_model->index(dest)); |
| 214 | |
| 215 | //source |
| 216 | QDirModelcxx . . $ QDirModel# *s_model = new QDirModelcxx . . $ QDirModel#; |
| 217 | |
| 218 | //s_model -> setFilter(QDir::AllDirs | QDir::NoDotAndDotDot | QDir::AllEntries | QDir::Hidden); |
| 219 | //s_model -> setSorting(QDir::Name | QDir::DirsFirst | QDir::IgnoreCase | QDir::LocaleAware); |
| 220 | //uiG.treeView_source -> setModel(s_model); |
| 221 | //uiG.treeView_source -> sortByColumn (0, Qt::AscendingOrder); |
| 222 | //uiG.treeView_source -> setRootIndex(s_model->index(source)); |
| 223 | |
| 224 | RsyncDirModelcxx . . $ RsyncDirModel# *rsyncmodel=new RsyncDirModelcxx . . $ RsyncDirModel#; |
| 225 | |
| 226 | // if a snapshot is not selected |
| 227 | if (CurrentSnapshotStringcxx . . $ manageDialog#CurrentSnapshotString. ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "") |
| 228 | { |
| 229 | viewLogVisiblecxx . . $ manageDialog#viewLogVisible. = false; |
| 230 | deleteVisiblecxx . . $ manageDialog#deleteVisible. = false; |
| 231 | restoreVisiblecxx . . $ manageDialog#restoreVisible. = false; |
| 232 | |
| 233 | if (!Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetTypeSynccxx . . $ operation#GetTypeSync(50ce9a9e25b4a850).()) |
| 234 | { |
| 235 | destVisible = false; |
| 236 | uiGcxx . . $ manageDialog#uiG..label_destErrorcxx . . $ Ui_manageDialog#label_destError. -> setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("<font color=magenta>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("Please select a snapshot from the list", |
| 237 | "Information message") +cxx . . $ operator+(3d22f08efddf8107). "</font>"); |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | // if "not available" is selected |
| 242 | if (CurrentSnapshotStringcxx . . $ manageDialog#CurrentSnapshotString. ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "not available") |
| 243 | viewLogVisiblecxx . . $ manageDialog#viewLogVisible. = false; //disable the "view log" button |
| 244 | |
| 245 | // _______________________________ source & destination directories checks ____________________________________________ |
| 246 | // ___________________________________________________________________________________________________________________ |
| 247 | // check if source & destination exist or have read/enter permissions or are remote ---------------------------------- |
| 248 | QFileInfocxx . . $ QFileInfo# destFilecxx . . $ QFileInfo#QFileInfo(3520e46b33348bf6).(destcxx . . $ manageDialog#dest.); |
| 249 | QFileInfocxx . . $ QFileInfo# sourceFilecxx . . $ QFileInfo#QFileInfo(3520e46b33348bf6).(sourcecxx . . $ manageDialog#source.); |
| 250 | bool sourceRemote = (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemotecxx . . $ operation#GetRemote(50ce9a9e25b4a850).()) && (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSourcecxx . . $ operation#GetRemoteSource(50ce9a9e25b4a850).()); |
| 251 | bool destRemote = (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemotecxx . . $ operation#GetRemote(50ce9a9e25b4a850).()) && (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteDestinationcxx . . $ operation#GetRemoteDestination(50ce9a9e25b4a850).()); |
| 252 | |
| 253 | if (sourceRemote) // If remote is used for source |
| 254 | { |
| 255 | //sourceVisible = false; |
| 256 | //uiG.label_sourceError -> setText("<font color=magenta>" + tr("Display of remote places is not supported", |
| 257 | // "Information message") + "</font>"); |
| 258 | |
| 259 | // ~~~~~~~~~~~~~~~~ Juan's patch for source~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 260 | QStringListcxx . . $ QStringList# remoteArgscxx . . $ QStringList#QStringList(ced63f7c635d850d).; |
| 261 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("--protect-args"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 262 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.]-> GetRemoteModulecxx . . $ operation#GetRemoteModule(50ce9a9e25b4a850).() && Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemotePasswordcxx . . $ operation#GetRemotePassword(6ef7b6c27b00b43d).() !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 263 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("--password-file=" +cxx . . $ operator+(c75c3ae4eb9af1a8). ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemotePasswordcxx . . $ operation#GetRemotePassword(6ef7b6c27b00b43d).()) ); |
| 264 | |
| 265 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHcxx . . $ operation#GetRemoteSSH(50ce9a9e25b4a850).()) |
| 266 | { |
| 267 | QStringcxx . . $ QString# sshOptions=(Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHOptionscxx . . $ operation#GetRemoteSSHOptions(6ef7b6c27b00b43d).()).replacecxx . . $ QString#replace(192e628656427d1c).("\""cxx . . $ QString#QString(85c52e162fed56f9).,"\\\""cxx . . $ QString#QString(85c52e162fed56f9).)+cxx . . $ operator+(3d22f08efddf8107)." -o \"StrictHostKeyChecking no\" -o \"PasswordAuthentication no\" "; |
| 268 | if (WINrunningcxx . . $ Global/WINrunning.) |
| 269 | { |
| 270 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPasswordcxx . . $ operation#GetRemoteSSHPassword(6ef7b6c27b00b43d).() !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 271 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).() != 0) |
| 272 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e \""+cxx . . $ operator+(c75c3ae4eb9af1a8).Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSshCommandcxx . . $ operation#GetSshCommand(6ef7b6c27b00b43d).()+cxx . . $ operator+(3d22f08efddf8107)."\" "+cxx . . $ operator+(fab9b4f80031f353).sshOptions+cxx . . $ operator+(3d22f08efddf8107)." -i \"" +cxx . . $ operator+(fab9b4f80031f353). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPasswordcxx . . $ operation#GetRemoteSSHPassword(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107)."\" -p " +cxx . . $ operator+(fab9b4f80031f353). |
| 273 | countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).()) ); |
| 274 | else |
| 275 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e \""+cxx . . $ operator+(c75c3ae4eb9af1a8).Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSshCommandcxx . . $ operation#GetSshCommand(6ef7b6c27b00b43d).()+cxx . . $ operator+(3d22f08efddf8107)."\" "+cxx . . $ operator+(fab9b4f80031f353).sshOptions+cxx . . $ operator+(3d22f08efddf8107)." -i \"" +cxx . . $ operator+(fab9b4f80031f353). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPasswordcxx . . $ operation#GetRemoteSSHPassword(6ef7b6c27b00b43d).()+cxx . . $ operator+(3d22f08efddf8107)."\""); |
| 276 | else |
| 277 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).() != 0) |
| 278 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e \""+cxx . . $ operator+(c75c3ae4eb9af1a8).Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSshCommandcxx . . $ operation#GetSshCommand(6ef7b6c27b00b43d).()+cxx . . $ operator+(3d22f08efddf8107)."\" "+cxx . . $ operator+(fab9b4f80031f353).sshOptions+cxx . . $ operator+(3d22f08efddf8107)." -p " +cxx . . $ operator+(fab9b4f80031f353). countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).()) ); |
| 279 | else |
| 280 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e \""+cxx . . $ operator+(c75c3ae4eb9af1a8).Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSshCommandcxx . . $ operation#GetSshCommand(6ef7b6c27b00b43d).()+cxx . . $ operator+(3d22f08efddf8107)."\" "+cxx . . $ operator+(fab9b4f80031f353).sshOptions+cxx . . $ operator+(3d22f08efddf8107).""); |
| 281 | } |
| 282 | else |
| 283 | { |
| 284 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPasswordcxx . . $ operation#GetRemoteSSHPassword(6ef7b6c27b00b43d).() !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 285 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).() != 0) |
| 286 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e "+cxx . . $ operator+(c75c3ae4eb9af1a8).sshCommandPathcxx . . $ Global/sshCommandPath.+cxx . . $ operator+(3d22f08efddf8107)." -i " +cxx . . $ operator+(fab9b4f80031f353). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPasswordcxx . . $ operation#GetRemoteSSHPassword(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107)." -p " +cxx . . $ operator+(fab9b4f80031f353). |
| 287 | countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).()) ); |
| 288 | else |
| 289 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e "+cxx . . $ operator+(c75c3ae4eb9af1a8).sshCommandPathcxx . . $ Global/sshCommandPath.+cxx . . $ operator+(3d22f08efddf8107)." -i " +cxx . . $ operator+(fab9b4f80031f353). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPasswordcxx . . $ operation#GetRemoteSSHPassword(6ef7b6c27b00b43d).()); |
| 290 | else |
| 291 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).() != 0) |
| 292 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e "+cxx . . $ operator+(c75c3ae4eb9af1a8).sshCommandPathcxx . . $ Global/sshCommandPath.+cxx . . $ operator+(3d22f08efddf8107)." -p " +cxx . . $ operator+(fab9b4f80031f353). countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).()) ); |
| 293 | else |
| 294 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e "+cxx . . $ operator+(c75c3ae4eb9af1a8).sshCommandPathcxx . . $ Global/sshCommandPath.); |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | rsyncmodel -> setUrlcxx . . $ RsyncDirModel#setUrl(81e429cd986f7dfb).(QUrlcxx . . $ QUrl#QUrl(ea1f3831e370f1cb).(sourcecxx . . $ manageDialog#source.),rsyncCommandPathcxx . . $ Global/rsyncCommandPath.,remoteArgs); |
| 299 | uiGcxx . . $ manageDialog#uiG..treeView_sourcecxx . . $ Ui_manageDialog#treeView_source. -> setModelcxx . . $ QTreeView#setModel(c6e1f1e42522b780).(rsyncmodel); |
| 300 | uiGcxx . . $ manageDialog#uiG..treeView_sourcecxx . . $ Ui_manageDialog#treeView_source. -> sortByColumncxx . . $ QTreeView#sortByColumn(11168df8d4e8286d). (0, Qtcxx . . $ Qt/::AscendingOrdercxx . . $ Qt/AscendingOrder.); |
| 301 | |
| 302 | } |
| 303 | else |
| 304 | { |
| 305 | s_model -> setFiltercxx . . $ QDirModel#setFilter(3cb6a626764edf13).(QDircxx . . $ QDir#::AllDirscxx . . $ QDir#AllDirs. |cxx . . $ `operator|`(153b300229e4e3d0). QDircxx . . $ QDir#::NoDotAndDotDotcxx . . $ QDir#NoDotAndDotDot. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::AllEntriescxx . . $ QDir#AllEntries. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::Hiddencxx . . $ QDir#Hidden.); |
| 306 | s_model -> setSortingcxx . . $ QDirModel#setSorting(d6e6037501f8ac03).(QDircxx . . $ QDir#::Namecxx . . $ QDir#Name. |cxx . . $ `operator|`(2e9dd8934c680bb9). QDircxx . . $ QDir#::DirsFirstcxx . . $ QDir#DirsFirst. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::IgnoreCasecxx . . $ QDir#IgnoreCase. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::LocaleAwarecxx . . $ QDir#LocaleAware.); |
| 307 | uiGcxx . . $ manageDialog#uiG..treeView_sourcecxx . . $ Ui_manageDialog#treeView_source. -> setModelcxx . . $ QTreeView#setModel(c6e1f1e42522b780).(s_model); |
| 308 | uiGcxx . . $ manageDialog#uiG..treeView_sourcecxx . . $ Ui_manageDialog#treeView_source. -> sortByColumncxx . . $ QTreeView#sortByColumn(11168df8d4e8286d). (0, Qtcxx . . $ Qt/::AscendingOrdercxx . . $ Qt/AscendingOrder.); |
| 309 | uiGcxx . . $ manageDialog#uiG..treeView_sourcecxx . . $ Ui_manageDialog#treeView_source. -> setRootIndexcxx . . $ QTreeView#setRootIndex(87a6de385263c395).(s_model->indexcxx . . $ QDirModel#index(bdc49d3b19f4529).(sourcecxx . . $ manageDialog#source.)); |
| 310 | } |
| 311 | if (destRemote) // If remote is used for destination |
| 312 | { |
| 313 | // destVisible = false; |
| 314 | |
| 315 | // ********************** WARNING - Change this when you figure out a way to display/delete remote places ************************************* |
| 316 | // uiG.label_destError -> setText("<font color=magenta>" + tr("Display of remote places is not supported", |
| 317 | // "Information message") + "</font>"); |
| 318 | deleteVisiblecxx . . $ manageDialog#deleteVisible. = false; //disable the delete button |
| 319 | |
| 320 | // ~~~~~~~~~~~~~~~~ Juan's patch for dest~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 321 | QStringListcxx . . $ QStringList# remoteArgscxx . . $ QStringList#QStringList(ced63f7c635d850d).; |
| 322 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("--protect-args"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 323 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.]-> GetRemoteModulecxx . . $ operation#GetRemoteModule(50ce9a9e25b4a850).() && Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemotePasswordcxx . . $ operation#GetRemotePassword(6ef7b6c27b00b43d).() !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 324 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("--password-file=" +cxx . . $ operator+(c75c3ae4eb9af1a8). ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemotePasswordcxx . . $ operation#GetRemotePassword(6ef7b6c27b00b43d).()) ); |
| 325 | |
| 326 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHcxx . . $ operation#GetRemoteSSH(50ce9a9e25b4a850).()) |
| 327 | { |
| 328 | QStringcxx . . $ QString# sshOptions=(Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHOptionscxx . . $ operation#GetRemoteSSHOptions(6ef7b6c27b00b43d).()).replacecxx . . $ QString#replace(192e628656427d1c).("\""cxx . . $ QString#QString(85c52e162fed56f9).,"\\\""cxx . . $ QString#QString(85c52e162fed56f9).)+cxx . . $ operator+(3d22f08efddf8107)." -o \"StrictHostKeyChecking no\" -o \"PasswordAuthentication no\" "; |
| 329 | if (WINrunningcxx . . $ Global/WINrunning.) |
| 330 | { |
| 331 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPasswordcxx . . $ operation#GetRemoteSSHPassword(6ef7b6c27b00b43d).() !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 332 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).() != 0) |
| 333 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e \""+cxx . . $ operator+(c75c3ae4eb9af1a8).Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSshCommandcxx . . $ operation#GetSshCommand(6ef7b6c27b00b43d).()+cxx . . $ operator+(3d22f08efddf8107)."\" "+cxx . . $ operator+(fab9b4f80031f353).sshOptions+cxx . . $ operator+(3d22f08efddf8107)." -i \"" +cxx . . $ operator+(fab9b4f80031f353). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPasswordcxx . . $ operation#GetRemoteSSHPassword(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107)."\" -p " +cxx . . $ operator+(fab9b4f80031f353). |
| 334 | countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).()) ); |
| 335 | else |
| 336 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e \""+cxx . . $ operator+(c75c3ae4eb9af1a8).Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSshCommandcxx . . $ operation#GetSshCommand(6ef7b6c27b00b43d).()+cxx . . $ operator+(3d22f08efddf8107)."\" "+cxx . . $ operator+(fab9b4f80031f353).sshOptions+cxx . . $ operator+(3d22f08efddf8107)." -i \"" +cxx . . $ operator+(fab9b4f80031f353). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPasswordcxx . . $ operation#GetRemoteSSHPassword(6ef7b6c27b00b43d).()+cxx . . $ operator+(3d22f08efddf8107)."\""); |
| 337 | else |
| 338 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).() != 0) |
| 339 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e \""+cxx . . $ operator+(c75c3ae4eb9af1a8).Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSshCommandcxx . . $ operation#GetSshCommand(6ef7b6c27b00b43d).()+cxx . . $ operator+(3d22f08efddf8107)."\" "+cxx . . $ operator+(fab9b4f80031f353).sshOptions+cxx . . $ operator+(3d22f08efddf8107)." -p " +cxx . . $ operator+(fab9b4f80031f353). countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).()) ); |
| 340 | else |
| 341 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e \""+cxx . . $ operator+(c75c3ae4eb9af1a8).Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSshCommandcxx . . $ operation#GetSshCommand(6ef7b6c27b00b43d).()+cxx . . $ operator+(3d22f08efddf8107)."\" "+cxx . . $ operator+(fab9b4f80031f353).sshOptions+cxx . . $ operator+(3d22f08efddf8107).""); |
| 342 | } |
| 343 | else |
| 344 | { |
| 345 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPasswordcxx . . $ operation#GetRemoteSSHPassword(6ef7b6c27b00b43d).() !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 346 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).() != 0) |
| 347 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e "+cxx . . $ operator+(c75c3ae4eb9af1a8).sshCommandPathcxx . . $ Global/sshCommandPath.+cxx . . $ operator+(3d22f08efddf8107)." -i " +cxx . . $ operator+(fab9b4f80031f353). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPasswordcxx . . $ operation#GetRemoteSSHPassword(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107)." -p " +cxx . . $ operator+(fab9b4f80031f353). |
| 348 | countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).()) ); |
| 349 | else |
| 350 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e "+cxx . . $ operator+(c75c3ae4eb9af1a8).sshCommandPathcxx . . $ Global/sshCommandPath.+cxx . . $ operator+(3d22f08efddf8107)." -i " +cxx . . $ operator+(fab9b4f80031f353). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPasswordcxx . . $ operation#GetRemoteSSHPassword(6ef7b6c27b00b43d).()); |
| 351 | else |
| 352 | if ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).() != 0) |
| 353 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e "+cxx . . $ operator+(c75c3ae4eb9af1a8).sshCommandPathcxx . . $ Global/sshCommandPath.+cxx . . $ operator+(3d22f08efddf8107)." -p " +cxx . . $ operator+(fab9b4f80031f353). countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemoteSSHPortcxx . . $ operation#GetRemoteSSHPort(455f465bc33b4cdf).()) ); |
| 354 | else |
| 355 | remoteArgs.appendcxx . . $ QList#append(77d9f17553126ecb).("-e "+cxx . . $ operator+(c75c3ae4eb9af1a8).sshCommandPathcxx . . $ Global/sshCommandPath.); |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | rsyncmodel->setUrlcxx . . $ RsyncDirModel#setUrl(81e429cd986f7dfb).(QUrlcxx . . $ QUrl#QUrl(ea1f3831e370f1cb).(destcxx . . $ manageDialog#dest.),rsyncCommandPathcxx . . $ Global/rsyncCommandPath.,remoteArgs); |
| 360 | uiGcxx . . $ manageDialog#uiG..treeView_browsercxx . . $ Ui_manageDialog#treeView_browser. -> setModelcxx . . $ QTreeView#setModel(c6e1f1e42522b780).(rsyncmodel); |
| 361 | uiGcxx . . $ manageDialog#uiG..treeView_browsercxx . . $ Ui_manageDialog#treeView_browser. -> sortByColumncxx . . $ QTreeView#sortByColumn(11168df8d4e8286d). (0, Qtcxx . . $ Qt/::AscendingOrdercxx . . $ Qt/AscendingOrder.); |
| 362 | } |
| 363 | else // Local destination |
| 364 | { |
| 365 | //if (CurrentSnapshotDir.exists()) |
| 366 | // uiG.treeView_browser -> setRootIndex(d_model->index(CurrentSnapshotDirectory)); |
| 367 | //else |
| 368 | |
| 369 | d_model -> setFiltercxx . . $ QDirModel#setFilter(3cb6a626764edf13).(QDircxx . . $ QDir#::AllDirscxx . . $ QDir#AllDirs. |cxx . . $ `operator|`(153b300229e4e3d0). QDircxx . . $ QDir#::NoDotAndDotDotcxx . . $ QDir#NoDotAndDotDot. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::AllEntriescxx . . $ QDir#AllEntries. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::Hiddencxx . . $ QDir#Hidden.); |
| 370 | d_model -> setSortingcxx . . $ QDirModel#setSorting(d6e6037501f8ac03).(QDircxx . . $ QDir#::Namecxx . . $ QDir#Name. |cxx . . $ `operator|`(2e9dd8934c680bb9). QDircxx . . $ QDir#::DirsFirstcxx . . $ QDir#DirsFirst. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::IgnoreCasecxx . . $ QDir#IgnoreCase. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::LocaleAwarecxx . . $ QDir#LocaleAware.); |
| 371 | |
| 372 | uiGcxx . . $ manageDialog#uiG..treeView_browsercxx . . $ Ui_manageDialog#treeView_browser. -> setModelcxx . . $ QTreeView#setModel(c6e1f1e42522b780).(d_model); |
| 373 | uiGcxx . . $ manageDialog#uiG..treeView_browsercxx . . $ Ui_manageDialog#treeView_browser. -> sortByColumncxx . . $ QTreeView#sortByColumn(11168df8d4e8286d). (0, Qtcxx . . $ Qt/::AscendingOrdercxx . . $ Qt/AscendingOrder.); |
| 374 | uiGcxx . . $ manageDialog#uiG..treeView_browsercxx . . $ Ui_manageDialog#treeView_browser. -> setRootIndexcxx . . $ QTreeView#setRootIndex(87a6de385263c395).(d_model->indexcxx . . $ QDirModel#index(bdc49d3b19f4529).(destcxx . . $ manageDialog#dest.)); |
| 375 | } |
| 376 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Juan's patch END~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 377 | |
| 378 | // If source does not exist (and is not remote) |
| 379 | if ((!sourceFile.existscxx . . $ QFileInfo#exists(50ce9a9e25b4a850).()) && (!sourceRemote)) |
| 380 | { |
| 381 | sourceVisiblecxx . . $ manageDialog#sourceVisible. = false; |
| 382 | uiGcxx . . $ manageDialog#uiG..label_sourceErrorcxx . . $ Ui_manageDialog#label_sourceError. -> setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("<font color=red>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("This directory does not exist") +cxx . . $ operator+(3d22f08efddf8107). "</font>"); |
| 383 | } |
| 384 | // If destination does not exist |
| 385 | if ((!destFile.existscxx . . $ QFileInfo#exists(50ce9a9e25b4a850).()) && !(destRemote)) |
| 386 | { |
| 387 | destVisible = false; |
| 388 | uiGcxx . . $ manageDialog#uiG..label_destErrorcxx . . $ Ui_manageDialog#label_destError. -> setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("<font color=red>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("This directory does not exist", |
| 389 | "Information message") +cxx . . $ operator+(3d22f08efddf8107). "</font>"); |
| 390 | if (CurrentSnapshotStringcxx . . $ manageDialog#CurrentSnapshotString. ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "not available") |
| 391 | deleteVisiblecxx . . $ manageDialog#deleteVisible. = false; //disable the delete button |
| 392 | restoreVisiblecxx . . $ manageDialog#restoreVisible. = false; //disable the restore button |
| 393 | } |
| 394 | // If source does not have read/enter permissions |
| 395 | if (((!sourceFile.isReadablecxx . . $ QFileInfo#isReadable(50ce9a9e25b4a850).()) || (!sourceFile.isExecutablecxx . . $ QFileInfo#isExecutable(50ce9a9e25b4a850).())) && (!sourceRemote) && (sourceFile.existscxx . . $ QFileInfo#exists(50ce9a9e25b4a850).())) |
| 396 | { |
| 397 | sourceVisiblecxx . . $ manageDialog#sourceVisible. = false; |
| 398 | uiGcxx . . $ manageDialog#uiG..label_sourceErrorcxx . . $ Ui_manageDialog#label_sourceError. -> setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("<font color=red>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("I do not have sufficient permissions to read this directory", |
| 399 | "Information message") +cxx . . $ operator+(3d22f08efddf8107). "</font>"); |
| 400 | restoreVisiblecxx . . $ manageDialog#restoreVisible. = false; //disable the restore button |
| 401 | } |
| 402 | // If destination does not have read/enter permissions |
| 403 | if (((!destFile.isReadablecxx . . $ QFileInfo#isReadable(50ce9a9e25b4a850).()) || (!destFile.isExecutablecxx . . $ QFileInfo#isExecutable(50ce9a9e25b4a850).())) && (!destRemote) && (destFile.existscxx . . $ QFileInfo#exists(50ce9a9e25b4a850).())) |
| 404 | { |
| 405 | destVisible = false; |
| 406 | uiGcxx . . $ manageDialog#uiG..label_destErrorcxx . . $ Ui_manageDialog#label_destError. -> setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("<font color=red>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("I do not have sufficient permissions to read this directory", |
| 407 | "Information message") +cxx . . $ operator+(3d22f08efddf8107). "</font>"); |
| 408 | deleteVisiblecxx . . $ manageDialog#deleteVisible. = false; //disable the delete button |
| 409 | restoreVisiblecxx . . $ manageDialog#restoreVisible. = false; //disable the restore button |
| 410 | } |
| 411 | |
| 412 | // _______________________________ source & destination directories checks END____________________________________________ |
| 413 | // ___________________________________________________________________________________________________________________ |
| 414 | |
| 415 | //if this is a "sync" task |
| 416 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetTypeSynccxx . . $ operation#GetTypeSync(50ce9a9e25b4a850).()) |
| 417 | { |
| 418 | syncTYPEcxx . . $ manageDialog#syncTYPE. = true; |
| 419 | uiGcxx . . $ manageDialog#uiG..label_destinationcxx . . $ Ui_manageDialog#label_destination. -> setTextcxx . . $ QLabel#setText(3520e46b33348bf6). (trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("sync dir A","full phrase: sync dir a: <DIRECTORY_A>")+cxx . . $ operator+(3d22f08efddf8107). ": "); |
| 420 | uiGcxx . . $ manageDialog#uiG..label_sourcecxx . . $ Ui_manageDialog#label_source. -> setTextcxx . . $ QLabel#setText(3520e46b33348bf6). (trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("sync dir B","full phrase: sync dir a: <DIRECTORY_b>")+cxx . . $ operator+(3d22f08efddf8107). ": "); |
| 421 | uiGcxx . . $ manageDialog#uiG..pushButton_viewLogcxx . . $ Ui_manageDialog#pushButton_viewLog. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("View the logfile of the selected sync task","'view log' pushbutton tooltip")); |
| 422 | deleteVisiblecxx . . $ manageDialog#deleteVisible. = false; |
| 423 | restoreVisiblecxx . . $ manageDialog#restoreVisible. = false; |
| 424 | uiGcxx . . $ manageDialog#uiG..checkBox_viewSourcecxx . . $ Ui_manageDialog#checkBox_viewSource. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(false); |
| 425 | } |
| 426 | |
| 427 | // hide or show the treebrowsers - textbrowser |
| 428 | uiGcxx . . $ manageDialog#uiG..textBrowser_snapshotcxx . . $ Ui_manageDialog#textBrowser_snapshot. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (false); |
| 429 | uiGcxx . . $ manageDialog#uiG..treeView_browsercxx . . $ Ui_manageDialog#treeView_browser. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (destVisible); |
| 430 | uiGcxx . . $ manageDialog#uiG..label_destErrorcxx . . $ Ui_manageDialog#label_destError. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (!destVisible); |
| 431 | hideSourceStuffcxx . . $ manageDialog#hideSourceStuff(49f6e7a06ebc5aa8).(); |
| 432 | |
| 433 | //enable/disable the pushbuttons |
| 434 | uiGcxx . . $ manageDialog#uiG..pushButton_viewLogcxx . . $ Ui_manageDialog#pushButton_viewLog. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(viewLogVisiblecxx . . $ manageDialog#viewLogVisible.); |
| 435 | uiGcxx . . $ manageDialog#uiG..pushButton_calculate_diffscxx . . $ Ui_manageDialog#pushButton_calculate_diffs. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(destVisible); |
| 436 | |
| 437 | // Enable the delete button only for the first snapshot in list |
| 438 | if (CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo. > 0) |
| 439 | deleteVisiblecxx . . $ manageDialog#deleteVisible. = false; |
| 440 | |
| 441 | uiGcxx . . $ manageDialog#uiG..pushButton_deletecxx . . $ Ui_manageDialog#pushButton_delete. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(deleteVisiblecxx . . $ manageDialog#deleteVisible.); |
| 442 | uiGcxx . . $ manageDialog#uiG..pushButton_restorecxx . . $ Ui_manageDialog#pushButton_restore. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(restoreVisiblecxx . . $ manageDialog#restoreVisible.); |
| 443 | } |
| 444 | |
| 445 | // hideSourceStuff ===================================================================================================================== |
| 446 | // hides/shows the source treebrowser & label |
| 447 | void manageDialogcxx . . $ manageDialog#::hideSourceStuffcxx . . $ manageDialog#hideSourceStuff(49f6e7a06ebc5aa8).() |
| 448 | { |
| 449 | // Check the state of the "hide source" checkbox |
| 450 | bool boxState = uiGcxx . . $ manageDialog#uiG..checkBox_viewSourcecxx . . $ Ui_manageDialog#checkBox_viewSource. -> isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).(); |
| 451 | |
| 452 | if (boxState) |
| 453 | { |
| 454 | uiGcxx . . $ manageDialog#uiG..label_sourcecxx . . $ Ui_manageDialog#label_source. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(false); |
| 455 | uiGcxx . . $ manageDialog#uiG..lineEdit_sourcecxx . . $ Ui_manageDialog#lineEdit_source. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(false); |
| 456 | uiGcxx . . $ manageDialog#uiG..label_sourceErrorcxx . . $ Ui_manageDialog#label_sourceError. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (false); |
| 457 | uiGcxx . . $ manageDialog#uiG..treeView_sourcecxx . . $ Ui_manageDialog#treeView_source. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (false); |
| 458 | } |
| 459 | else |
| 460 | { |
| 461 | uiGcxx . . $ manageDialog#uiG..label_sourcecxx . . $ Ui_manageDialog#label_source. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(true); |
| 462 | uiGcxx . . $ manageDialog#uiG..lineEdit_sourcecxx . . $ Ui_manageDialog#lineEdit_source. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(true); |
| 463 | uiGcxx . . $ manageDialog#uiG..treeView_sourcecxx . . $ Ui_manageDialog#treeView_source. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (sourceVisiblecxx . . $ manageDialog#sourceVisible.); |
| 464 | uiGcxx . . $ manageDialog#uiG..label_sourceErrorcxx . . $ Ui_manageDialog#label_sourceError. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (!sourceVisiblecxx . . $ manageDialog#sourceVisible.); |
| 465 | } |
| 466 | } |
| 467 | |
| 468 | // SnapshotsListSelected ===================================================================================================================== |
| 469 | // disables pushbuttons when nothing is selected at snapshots listwidget |
| 470 | // Also sets QString CurrentSnapshotString at current snapshot, format YYYY |
| 471 | void manageDialogcxx . . $ manageDialog#::SnapshotsListSelectedcxx . . $ manageDialog#SnapshotsListSelected(49f6e7a06ebc5aa8).() |
| 472 | { |
| 473 | CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo. = uiGcxx . . $ manageDialog#uiG..listWidget_datescxx . . $ Ui_manageDialog#listWidget_dates. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); |
| 474 | // if a snapshot is not selected |
| 475 | if (CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo. < 0) |
| 476 | { |
| 477 | CurrentSnapshotStringcxx . . $ manageDialog#CurrentSnapshotString. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 478 | CurrentSnapshotDirectorycxx . . $ manageDialog#CurrentSnapshotDirectory. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 479 | } |
| 480 | else |
| 481 | { |
| 482 | CurrentSnapshotStringcxx . . $ manageDialog#CurrentSnapshotString. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSnapshotsListItemcxx . . $ operation#GetSnapshotsListItem(3f3c3d0e9c0eb37f). (CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo.); |
| 483 | |
| 484 | if (WINrunningcxx . . $ Global/WINrunning. && Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemotecxx . . $ operation#GetRemote(50ce9a9e25b4a850).()) |
| 485 | CurrentSnapshotDirectorycxx . . $ manageDialog#CurrentSnapshotDirectory. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). destcxx . . $ manageDialog#dest. +cxx . . $ operator+(fab9b4f80031f353). snapDefaultDircxx . . $ Global/snapDefaultDir..replacecxx . . $ QString#replace(192e628656427d1c).(SLASHcxx . . $ Global/SLASH.,XnixSLASHcxx . . $ Global/XnixSLASH.) +cxx . . $ operator+(fab9b4f80031f353). CurrentSnapshotStringcxx . . $ manageDialog#CurrentSnapshotString. +cxx . . $ operator+(fab9b4f80031f353). XnixSLASHcxx . . $ Global/XnixSLASH. +cxx . . $ operator+(fab9b4f80031f353). sourceLastcxx . . $ manageDialog#sourceLast.; |
| 486 | else |
| 487 | CurrentSnapshotDirectorycxx . . $ manageDialog#CurrentSnapshotDirectory. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). destcxx . . $ manageDialog#dest. +cxx . . $ operator+(fab9b4f80031f353). snapDefaultDircxx . . $ Global/snapDefaultDir. +cxx . . $ operator+(fab9b4f80031f353). CurrentSnapshotStringcxx . . $ manageDialog#CurrentSnapshotString. +cxx . . $ operator+(fab9b4f80031f353). SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). sourceLastcxx . . $ manageDialog#sourceLast.; |
| 488 | |
| 489 | if (CurrentSnapshotStringcxx . . $ manageDialog#CurrentSnapshotString. ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "") // if there is no execution time of the current snapshot |
| 490 | CurrentSnapshotStringcxx . . $ manageDialog#CurrentSnapshotString. =cxx . . $ QString#`operator=`(d02845eef0c33901). "not available"; |
| 491 | } |
| 492 | |
| 493 | fixGuicxx . . $ manageDialog#fixGui(49f6e7a06ebc5aa8).(); // update the gui |
| 494 | } |
| 495 | |
| 496 | // calculateDifferences() ======================================================================================== |
| 497 | // calculate differences between source and snapshot |
| 498 | // Calls readDirEntries() |
| 499 | void manageDialogcxx . . $ manageDialog#::calculateDifferencescxx . . $ manageDialog#calculateDifferences(49f6e7a06ebc5aa8).() |
| 500 | { |
| 501 | // if the thread is running (meaning: STOP is pressed) |
| 502 | if (calcdiffthreadcxx . . $ manageDialog#calcdiffthread. -> isRunningcxx . . $ QThread#isRunning(50ce9a9e25b4a850).()) |
| 503 | { |
| 504 | uiGcxx . . $ manageDialog#uiG..textBrowser_snapshotcxx . . $ Ui_manageDialog#textBrowser_snapshot. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6). (trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("Please wait until the thread is terminated")); |
| 505 | uiGcxx . . $ manageDialog#uiG..pushButton_calculate_diffscxx . . $ Ui_manageDialog#pushButton_calculate_diffs. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 506 | calcdiffthreadcxx . . $ manageDialog#calcdiffthread. -> setAbortcxx . . $ CalcDiffThread#setAbort(b45ddcbc8423892c).(true); |
| 507 | abortCalcThreadcxx . . $ manageDialog#abortCalcThread. = true; |
| 508 | return; |
| 509 | } |
| 510 | |
| 511 | // change the gui a bit |
| 512 | if (syncTYPEcxx . . $ manageDialog#syncTYPE.) |
| 513 | { |
| 514 | uiGcxx . . $ manageDialog#uiG..label_sourcecxx . . $ Ui_manageDialog#label_source. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(false); |
| 515 | uiGcxx . . $ manageDialog#uiG..lineEdit_sourcecxx . . $ Ui_manageDialog#lineEdit_source. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(false); |
| 516 | uiGcxx . . $ manageDialog#uiG..treeView_sourcecxx . . $ Ui_manageDialog#treeView_source. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (false); |
| 517 | } |
| 518 | uiGcxx . . $ manageDialog#uiG..treeView_browsercxx . . $ Ui_manageDialog#treeView_browser. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (false); |
| 519 | uiGcxx . . $ manageDialog#uiG..textBrowser_snapshotcxx . . $ Ui_manageDialog#textBrowser_snapshot. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (true); |
| 520 | |
| 521 | if (!snapCalculatedcxx . . $ manageDialog#snapCalculated..atcxx . . $ QList#at(e2681f9bb6b2f357).(CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo.)) // if the differences have not been calculated yet |
| 522 | { |
| 523 | //disable some gui stuff during calculations |
| 524 | uiGcxx . . $ manageDialog#uiG..pushButton_deletecxx . . $ Ui_manageDialog#pushButton_delete. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 525 | uiGcxx . . $ manageDialog#uiG..pushButton_restorecxx . . $ Ui_manageDialog#pushButton_restore. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 526 | uiGcxx . . $ manageDialog#uiG..pushButton_viewLogcxx . . $ Ui_manageDialog#pushButton_viewLog. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 527 | uiGcxx . . $ manageDialog#uiG..pushButton_cancelcxx . . $ Ui_manageDialog#pushButton_cancel. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 528 | uiGcxx . . $ manageDialog#uiG..pushButton_calculate_diffscxx . . $ Ui_manageDialog#pushButton_calculate_diffs. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("STOP")); |
| 529 | uiGcxx . . $ manageDialog#uiG..pushButton_calculate_diffscxx . . $ Ui_manageDialog#pushButton_calculate_diffs. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("Stop calculations NOW")); |
| 530 | |
| 531 | |
| 532 | calcdiffthreadcxx . . $ manageDialog#calcdiffthread. -> passParamscxx . . $ CalcDiffThread#passParams(c02e609e5be302db).(destcxx . . $ QString#QString(132dd6869045752b)., destcxx . . $ QString#QString(132dd6869045752b)., CurrentSnapshotDirectorycxx . . $ QString#QString(132dd6869045752b)., CurrentSnapshotStringcxx . . $ QString#QString(132dd6869045752b)., sourceLastcxx . . $ QString#QString(132dd6869045752b)., sourcecxx . . $ QString#QString(132dd6869045752b)., CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo., currentSnapscxx . . $ manageDialog#currentSnaps., syncTYPEcxx . . $ manageDialog#syncTYPE.); |
| 533 | calcdiffthreadcxx . . $ manageDialog#calcdiffthread. -> startcxx . . $ QThread#start(bd4fe741c868f69f).(); |
| 534 | } |
| 535 | else |
| 536 | uiGcxx . . $ manageDialog#uiG..textBrowser_snapshotcxx . . $ Ui_manageDialog#textBrowser_snapshot. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6). (calculatedDifferencescxx . . $ manageDialog#calculatedDifferences..atcxx . . $ QList#at(e2681f9bb6b2f357).(CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo.)); |
| 537 | } |
| 538 | |
| 539 | // calcDiffEnd ===================================================================================================================== |
| 540 | // // diffs have been calculated - update viewer with new text |
| 541 | void manageDialogcxx . . $ manageDialog#::calcDiffEndcxx . . $ manageDialog#calcDiffEnd(49f6e7a06ebc5aa8).() |
| 542 | { |
| 543 | // Update the textBrowser_snapshot with differences data |
| 544 | calculatedDifferencescxx . . $ manageDialog#calculatedDifferences..replacecxx . . $ QList#replace(20dcc09d4a3213bb).(CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo., calcdiffthreadcxx . . $ manageDialog#calcdiffthread. -> returnResultcxx . . $ CalcDiffThread#returnResult(4365c3963150523e).() ); |
| 545 | uiGcxx . . $ manageDialog#uiG..textBrowser_snapshotcxx . . $ Ui_manageDialog#textBrowser_snapshot. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6). (calculatedDifferencescxx . . $ manageDialog#calculatedDifferences..atcxx . . $ QList#at(e2681f9bb6b2f357).(CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo.)); |
| 546 | |
| 547 | if (abortCalcThreadcxx . . $ manageDialog#abortCalcThread.) |
| 548 | uiGcxx . . $ manageDialog#uiG..textBrowser_snapshotcxx . . $ Ui_manageDialog#textBrowser_snapshot. -> appendcxx . . $ QTextEdit#append(3520e46b33348bf6). ("<p align=\"center\"><font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("Calculations terminated by user") +cxx . . $ operator+(3d22f08efddf8107). "</b></font></p>"); |
| 549 | else |
| 550 | snapCalculatedcxx . . $ manageDialog#snapCalculated..replacecxx . . $ QList#replace(20dcc09d4a3213bb).(CurrentSnapshotNocxx . . $ manageDialog#CurrentSnapshotNo., true ); |
| 551 | |
| 552 | abortCalcThreadcxx . . $ manageDialog#abortCalcThread. = false; |
| 553 | calcdiffthreadcxx . . $ manageDialog#calcdiffthread. -> setAbortcxx . . $ CalcDiffThread#setAbort(b45ddcbc8423892c).(false); |
| 554 | |
| 555 | // re-enable gui stuff |
| 556 | uiGcxx . . $ manageDialog#uiG..pushButton_deletecxx . . $ Ui_manageDialog#pushButton_delete. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(deleteVisiblecxx . . $ manageDialog#deleteVisible.); |
| 557 | uiGcxx . . $ manageDialog#uiG..pushButton_restorecxx . . $ Ui_manageDialog#pushButton_restore. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(restoreVisiblecxx . . $ manageDialog#restoreVisible.); |
| 558 | uiGcxx . . $ manageDialog#uiG..pushButton_viewLogcxx . . $ Ui_manageDialog#pushButton_viewLog. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(viewLogVisiblecxx . . $ manageDialog#viewLogVisible.); |
| 559 | uiGcxx . . $ manageDialog#uiG..pushButton_cancelcxx . . $ Ui_manageDialog#pushButton_cancel. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 560 | uiGcxx . . $ manageDialog#uiG..pushButton_calculate_diffscxx . . $ Ui_manageDialog#pushButton_calculate_diffs. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 561 | uiGcxx . . $ manageDialog#uiG..pushButton_calculate_diffscxx . . $ Ui_manageDialog#pushButton_calculate_diffs. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("Calculate differences")); |
| 562 | uiGcxx . . $ manageDialog#uiG..pushButton_calculate_diffscxx . . $ Ui_manageDialog#pushButton_calculate_diffs. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("Calculate the differences between the source and the selected snapshot")); |
| 563 | } |
| 564 | |
| 565 | // FUNCTIONS------------------------------------------------------------------------------------- |
| 566 | |
| 567 | // refreshDifWindow ===================================================================================================== |
| 568 | //Refresh the calc diff window with text |
| 569 | void manageDialogcxx . . $ manageDialog#::refreshDifWindowcxx . . $ manageDialog#refreshDifWindow(abbfd46f3b7726de).(const QStringcxx . . $ QString# &newText, const bool &appendText) |
| 570 | { |
| 571 | if (appendText) |
| 572 | uiGcxx . . $ manageDialog#uiG..textBrowser_snapshotcxx . . $ Ui_manageDialog#textBrowser_snapshot. -> appendcxx . . $ QTextEdit#append(3520e46b33348bf6).(newText); |
| 573 | else |
| 574 | uiGcxx . . $ manageDialog#uiG..textBrowser_snapshotcxx . . $ Ui_manageDialog#textBrowser_snapshot. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(newText); |
| 575 | // QCoreApplication::processEvents(); |
| 576 | } |
| 577 | |
| 578 | // updateSnapshots ===================================================================================================================== |
| 579 | // update the snapshots date & times listwidget |
| 580 | void manageDialogcxx . . $ manageDialog#::updateSnapshotscxx . . $ manageDialog#updateSnapshots(49f6e7a06ebc5aa8).() |
| 581 | { |
| 582 | //clear the listWidget |
| 583 | uiGcxx . . $ manageDialog#uiG..listWidget_datescxx . . $ Ui_manageDialog#listWidget_dates. -> clearcxx . . $ QListWidget#clear(49f6e7a06ebc5aa8).(); |
| 584 | calculatedDifferencescxx . . $ manageDialog#calculatedDifferences..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); // this holds the calculated differences text for each snapshot |
| 585 | snapCalculatedcxx . . $ manageDialog#snapCalculated..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); |
| 586 | |
| 587 | //initialize snapshot variables |
| 588 | currentSnapscxx . . $ manageDialog#currentSnaps. = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSnapshotsListSizecxx . . $ operation#GetSnapshotsListSize(455f465bc33b4cdf).(); // this is the current number of snapshots |
| 589 | bool emptySnapList = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SnapshotsListIsEmptycxx . . $ operation#SnapshotsListIsEmpty(c9857a73d68e59ba).(); // Is the list empty ?? |
| 590 | |
| 591 | // first check if there is a last execution time available but no snapshots are declared |
| 592 | // and add a new snapshot with the last execution date-time |
| 593 | timecxx . . $ manageDialog#time. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). ( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetLastExecutionTimecxx . . $ operation#GetLastExecutionTime(4e062b5c490497ac).() ).toStringcxx . . $ QDateTime#toString(5555d9024dcf93fb).("yyyyMMddhhmmss"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 594 | if ( !(timecxx . . $ manageDialog#time. ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "") && (emptySnapList) ) |
| 595 | { |
| 596 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> AddSnapshotsListItemcxx . . $ operation#AddSnapshotsListItem(7df51288a9ebd664). (timecxx . . $ QString#QString(132dd6869045752b).); |
| 597 | currentSnapscxx . . $ manageDialog#currentSnaps. = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSnapshotsListSizecxx . . $ operation#GetSnapshotsListSize(455f465bc33b4cdf).(); // this is the current number of snapshots |
| 598 | emptySnapList = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SnapshotsListIsEmptycxx . . $ operation#SnapshotsListIsEmpty(c9857a73d68e59ba).(); // Is the list empty ?? |
| 599 | } |
| 600 | |
| 601 | //update the listwidget with times from snapshots |
| 602 | countcxx . . $ manageDialog#count.=0; |
| 603 | while (countcxx . . $ manageDialog#count. < currentSnapscxx . . $ manageDialog#currentSnaps.) |
| 604 | { |
| 605 | QDateTimecxx . . $ QDateTime# currentSnapTime = QDateTimecxx . . $ QDateTime#::fromStringcxx . . $ QDateTime#fromString(231687af0a676ea1).(Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.]-> GetSnapshotsListItemcxx . . $ operation#GetSnapshotsListItem(3f3c3d0e9c0eb37f).(countcxx . . $ manageDialog#count.),"yyyyMMddhhmmss"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 606 | if ((Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.]-> GetSnapshotsListItemcxx . . $ operation#GetSnapshotsListItem(3f3c3d0e9c0eb37f).(countcxx . . $ manageDialog#count.)) ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "") // if there is no snapshot time for a reason |
| 607 | uiGcxx . . $ manageDialog#uiG..listWidget_datescxx . . $ Ui_manageDialog#listWidget_dates. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6). (trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("not available","refers to a date-time")); |
| 608 | else |
| 609 | uiGcxx . . $ manageDialog#uiG..listWidget_datescxx . . $ Ui_manageDialog#listWidget_dates. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6). (currentSnapTime.toStringcxx . . $ QDateTime#toString(5555d9024dcf93fb).("yyyy/MM/dd - hh:mm:ss"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 610 | |
| 611 | calculatedDifferencescxx . . $ manageDialog#calculatedDifferences..appendcxx . . $ QList#append(77d9f17553126ecb).(""cxx . . $ QString#QString(85c52e162fed56f9).); |
| 612 | snapCalculatedcxx . . $ manageDialog#snapCalculated..appendcxx . . $ QList#append(77d9f17553126ecb).(false); |
| 613 | |
| 614 | countcxx . . $ manageDialog#count.++; |
| 615 | } |
| 616 | |
| 617 | if (emptySnapList) |
| 618 | { |
| 619 | uiGcxx . . $ manageDialog#uiG..listWidget_datescxx . . $ Ui_manageDialog#listWidget_dates. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6). (trcxx . . $ manageDialog#tr(75d9f1c324b4579d).("not available","refers to a date-time")); |
| 620 | calculatedDifferencescxx . . $ manageDialog#calculatedDifferences..appendcxx . . $ QList#append(77d9f17553126ecb).(""cxx . . $ QString#QString(85c52e162fed56f9).); |
| 621 | snapCalculatedcxx . . $ manageDialog#snapCalculated..appendcxx . . $ QList#append(77d9f17553126ecb).(false); |
| 622 | } |
| 623 | |
| 624 | // select the latest snapshot |
| 625 | uiGcxx . . $ manageDialog#uiG..listWidget_datescxx . . $ Ui_manageDialog#listWidget_dates. -> setCurrentRowcxx . . $ QListWidget#setCurrentRow(d4f767463ce0a6b3).(uiGcxx . . $ manageDialog#uiG..listWidget_datescxx . . $ Ui_manageDialog#listWidget_dates. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).() - 1); |
| 626 | } |
| 627 | |
| 628 | |
| 629 | // end of manage.cpp --------------------------------------------------------------------------- |
| 630 |