correction of password managment
This commit is contained in:
+11
-9
@@ -46,6 +46,7 @@
|
||||
#include <QMenu>
|
||||
#include <QTranslator>
|
||||
#include <QInputDialog>
|
||||
#include <QSignalSpy>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class MainWindow; }
|
||||
@@ -61,10 +62,15 @@ class Connexion
|
||||
int contimeout = 20;
|
||||
QString server;
|
||||
QString service;
|
||||
QString path;
|
||||
QString savePath;
|
||||
QString user;
|
||||
QString password;
|
||||
QProcess * process = nullptr;
|
||||
int port = 873;
|
||||
bool comboboxChanged;
|
||||
bool quit = false;
|
||||
void clear();
|
||||
};
|
||||
|
||||
class Downloading
|
||||
@@ -104,7 +110,7 @@ class MainWindow : public QMainWindow
|
||||
~MainWindow();
|
||||
QProgressDialog *progress;
|
||||
Connexion connexion;
|
||||
Downloading downloading;
|
||||
Connexion downloading;
|
||||
QSettings settings;
|
||||
About about;
|
||||
QDialog Configuration;
|
||||
@@ -117,6 +123,7 @@ class MainWindow : public QMainWindow
|
||||
QSystemTrayIcon * trayIcon;
|
||||
QString icon = "/usr/share/icons/RsyncUI.png";
|
||||
bool rescan = false;
|
||||
bool passwordReturned;
|
||||
|
||||
QList<QString> UnitText {
|
||||
tr("B"),
|
||||
@@ -151,8 +158,6 @@ class MainWindow : public QMainWindow
|
||||
bool validateServer(QString server);
|
||||
bool isIpAddress(QString server);
|
||||
void addTreeItem(QString name, QString fileSize, QString fullsize, QString type, QString date, bool isDir, QTreeWidgetItem *parent);
|
||||
//QTreeWidgetItem * addTreeRoot(QString name, QString size, QString fullsize, bool isDir);
|
||||
//QTreeWidgetItem * addTreeChild(QTreeWidgetItem *parent, QString name, QString size, QString fullsize, bool isDir);
|
||||
bool scanDir(QString server, int portN, QTreeWidgetItem *parent = NULL, QString path = "" );
|
||||
void startDownloading();
|
||||
void loadSettings();
|
||||
@@ -165,8 +170,9 @@ class MainWindow : public QMainWindow
|
||||
void hideWindow();
|
||||
void showWindow();
|
||||
void init();
|
||||
bool getUserPassword(bool);
|
||||
bool getUserPassword(Connexion *);
|
||||
void preparePopulateTree();
|
||||
bool testServicePresence(QString, bool=false);
|
||||
|
||||
private slots:
|
||||
|
||||
@@ -176,10 +182,6 @@ class MainWindow : public QMainWindow
|
||||
|
||||
void downloadFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
|
||||
// void downloadProcessError(QProcess::ProcessError error);
|
||||
|
||||
void downloadProcessStderr();
|
||||
|
||||
void readRsyncOutput();
|
||||
|
||||
void stoppingDownload();
|
||||
@@ -226,7 +228,7 @@ class MainWindow : public QMainWindow
|
||||
void speed(QString);
|
||||
void finishedSignal(bool = true);
|
||||
void fileName(QString);
|
||||
//void errorSignal(QString);
|
||||
void passwordReady();
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user