Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
fde12a2ebf | |||
cb61f40ee8 | |||
4c52276882 | |||
38c25450ed | |||
6c19dccf2e | |||
ad3b44b3f4 | |||
6a381c05c8 | |||
106727506d | |||
e10558ff5b | |||
f40e4f9485 | |||
d82c8c942d | |||
1739b0adf3 | |||
fada0ebeb0 |
@ -22,6 +22,7 @@ Un clic gauche sur un fichier l'ajoute à la file des téléchargements, sur un
|
||||
Un clic droit sur un dossier ouvre un menu contextuel permettant de télécharger le dossier entier.
|
||||
Une notification s'affiche lors du début, de la fin, et lorsque l'on stoppe un téléchargement.
|
||||
Le gadget de fermeture ferme la fenêtre mais ne quitte pas l'application, pour afficher à nouveau la fenêtre, cliquez sur l'icône dans la boite à miniatures.
|
||||
Un identifiant et un mot de passe lorsqu'un service est protégé par mot de passe, celui-ci est enregistré dans le portefeuille système(gome-keyring ou kwallet)
|
||||
|
||||
## File de téléchargement
|
||||
|
||||
@ -30,7 +31,7 @@ Cliquez sur un fichier pour le supprimer de la file et une fenêtre de confirmat
|
||||
## Barre d'outils
|
||||
|
||||
1er icône: Changer le dossier de destination
|
||||
Permet de changer le dossier de téléchargement par défaut pour chaque service de chaque serveur.
|
||||
- Permet de changer le dossier de téléchargement par défaut pour chaque service de chaque serveur.
|
||||
|
||||
2ème icône: Paramètres de l'application
|
||||
- Limite de bande passante
|
||||
@ -41,7 +42,7 @@ Cliquez sur un fichier pour le supprimer de la file et une fenêtre de confirmat
|
||||
- Enregistrement automatique
|
||||
Enregistre automatiquement la liste des téléchargements en cours.(activé par défaut)
|
||||
3ème icône: À propos
|
||||
Affiche les propriétés de l'application.
|
||||
- Affiche les propriétés de l'application.
|
||||
4ème icône: À propos de QT
|
||||
5 ème icône: Quitter
|
||||
5ème icône: Quitter
|
||||
Permet de quitter le programme.
|
||||
|
65
RsyncUI.pro
65
RsyncUI.pro
@ -1,65 +0,0 @@
|
||||
QT += core gui concurrent
|
||||
QT += KItemViews
|
||||
QT += KCompletion
|
||||
QT += widgets
|
||||
QT += KConfigCore KConfigGui
|
||||
QT += KCoreAddons
|
||||
QT += KDBusAddons
|
||||
|
||||
#LIBS += -lKF5WindowSystem
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
# You can make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
downloadfile.cpp \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
password.cpp \
|
||||
tools.cpp
|
||||
|
||||
HEADERS += \
|
||||
downloadfile.h \
|
||||
mainwindow.h \
|
||||
password.h \
|
||||
tools.h
|
||||
|
||||
FORMS += \
|
||||
about.ui \
|
||||
configuration.ui \
|
||||
mainwindow.ui
|
||||
|
||||
TRANSLATIONS += \
|
||||
RsyncUI_fr_FR.ts
|
||||
|
||||
INCLUDEPATH += \
|
||||
/usr/include/KF5
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /usr/bin/
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
INSTALLS += lang
|
||||
INSTALLS += documentation
|
||||
INSTALLS += desktopfile
|
||||
INSTALLS += icon
|
||||
|
||||
RESOURCES +=
|
||||
|
||||
DISTFILES += \
|
||||
RsyncUI.desktop
|
||||
|
||||
lang.path = /languages/
|
||||
lang.path = /usr/share/locale/
|
||||
lang.files = languages/*
|
||||
documentation.path = /usr/share/doc/RsyncUI
|
||||
documentation.files = README*
|
||||
desktopfile.path = /usr/share/applications
|
||||
desktopfile.files = RsyncUI.desktop
|
||||
icon.path = /usr/share/icons/
|
||||
icon.files = RsyncUI.png
|
320
RsyncUI.pro.user
320
RsyncUI.pro.user
@ -1,320 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.14.2, 2023-03-08T15:56:52. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{a3117c94-e673-4dca-aa4c-050bbea034fe}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
|
||||
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
|
||||
<value type="QString" key="ClangCodeModel.WarningConfigId">Builtin.Questionable</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">2</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{893f9ca6-0efa-4c08-a4a6-5a818f60a8a0}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/build-RsyncUI-Desktop-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/build-RsyncUI-Desktop-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="int" key="RunSystemFunction">0</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/build-RsyncUI-Desktop-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/build-RsyncUI-Desktop-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
<value type="int" key="RunSystemFunction">0</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/daniel/develope/build-RsyncUI-Desktop-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/daniel/develope/build-RsyncUI-Desktop-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
<value type="int" key="RunSystemFunction">0</value>
|
||||
<value type="int" key="SeparateDebugInfo">0</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
|
||||
<value type="QString">cpu-cycles</value>
|
||||
</valuelist>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
|
||||
<value type="int" key="Analyzer.Perf.Frequency">250</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
|
||||
<value type="QString">-e</value>
|
||||
<value type="QString">cpu-cycles</value>
|
||||
<value type="QString">--call-graph</value>
|
||||
<value type="QString">dwarf,4096</value>
|
||||
<value type="QString">-F</value>
|
||||
<value type="QString">250</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">RsyncUI2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/daniel/develop/RsyncUI/RsyncUI.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/daniel/develop/RsyncUI/RsyncUI.pro</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/daniel/develope/build-RsyncUI-Desktop-Debug</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
@ -2,7 +2,7 @@
|
||||
|
||||
Name: rsyncui
|
||||
Summary: Client for rsync server
|
||||
Version: 2.9.2
|
||||
Version: 2.11.2
|
||||
Release: %mkrel 1
|
||||
License: GPLv3
|
||||
Group: Networking/Remote access
|
||||
|
3
main.cpp
3
main.cpp
@ -21,6 +21,9 @@ int main(int argc, char *argv[])
|
||||
a.installTranslator(&myappTranslator);
|
||||
}
|
||||
|
||||
static const QString appName = "RsyncUI";
|
||||
|
||||
//Password passwdJob;
|
||||
MainWindow w;
|
||||
w.show();
|
||||
w.init();
|
||||
|
167
mainwindow.cpp
167
mainwindow.cpp
@ -1,12 +1,13 @@
|
||||
#include "mainwindow.h"
|
||||
#include <QComboBox>
|
||||
#include <QTextBlock>
|
||||
|
||||
using namespace std;
|
||||
|
||||
bool display = false;
|
||||
//extern QDialog Configuration;
|
||||
extern Ui::Configuration config;
|
||||
extern bool testRsyncReturn(QProcess *);
|
||||
extern QApplication a;
|
||||
|
||||
QMap<int, QString> rsyncErrorStrings {
|
||||
{0, QTranslator::tr("Success. The rsync command completed successfully without any errors.")},
|
||||
@ -38,9 +39,10 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
QCoreApplication::setOrganizationName("RsyncUI");
|
||||
QCoreApplication::setApplicationName("RsyncUI");
|
||||
|
||||
this->setWindowTitle(a.applicationName());
|
||||
|
||||
// context menu for treewidget (list of files)
|
||||
ui->treeWidget->addAction(ui->actionDownload);
|
||||
|
||||
// init configuration window
|
||||
config.setupUi(&Configuration);
|
||||
|
||||
@ -64,8 +66,6 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
connect(this, &MainWindow::stopDownloading, this, &MainWindow::cancelled);
|
||||
connect(config.buttonBox, SIGNAL(accepted()), this, SLOT(on_buttonBox_accepted()));
|
||||
connect(config.comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MainWindow::on_comboBox_currentIndexChanged);
|
||||
// connect(loginD.loginBox, SIGNAL(accepted()), this, SLOT(on_loginBox_accepted()));
|
||||
// connect(this, SIGNAL(passwordReady()), this, SLOT(waitPasswword()));
|
||||
|
||||
loadSettings();
|
||||
|
||||
@ -116,7 +116,7 @@ void MainWindow::init()
|
||||
if (this->settings.value("Downloads/rows").toInt() != 0)
|
||||
{
|
||||
// asking if we load the list and continue downloading
|
||||
msgBox.setWindowTitle("RsyncUI");
|
||||
msgBox.setWindowTitle(a.applicationName());
|
||||
msgBox.setInformativeText(tr("A list of interrupted downloads exists, do you want to continue downloading ? if not the list will be cleared" ));
|
||||
|
||||
QPushButton *yes = msgBox.addButton(QMessageBox::Yes);
|
||||
@ -133,7 +133,7 @@ void MainWindow::init()
|
||||
}
|
||||
}
|
||||
// load list of services
|
||||
populateList();
|
||||
populateList(ui->khistorycombobox->currentIndex());
|
||||
}
|
||||
|
||||
void MainWindow::initSystemTrayIcon()
|
||||
@ -208,7 +208,7 @@ void MainWindow::quitApp()
|
||||
|
||||
reply = QMessageBox::question(
|
||||
this,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
tr("Exiting will stop downloading, and will clear the download queue.\nDo you want to exit ?") + displayText,
|
||||
param,
|
||||
QMessageBox::No);
|
||||
@ -246,7 +246,7 @@ void MainWindow::closeEvent (QCloseEvent *event)
|
||||
return;
|
||||
if (trayIcon->isVisible() and this->settings.value("CloseCheckbox").toBool() == false)
|
||||
{
|
||||
msgBox.setWindowTitle("RsyncUI");
|
||||
msgBox.setWindowTitle(a.applicationName());
|
||||
msgBox.setInformativeText(tr("The program will keep running in the "
|
||||
"system tray. To terminate the program, "
|
||||
"choose <b>Quit</b> in the context menu "
|
||||
@ -289,7 +289,10 @@ void MainWindow::populateTree()
|
||||
{
|
||||
// server is validated, scanning directory
|
||||
path = this->connexion.service + "/";
|
||||
scanDir(this->connexion.server, this->connexion.port, nullptr, path);
|
||||
while (this->rescan)
|
||||
{
|
||||
scanDir(this->connexion.server, this->connexion.port, nullptr, path);
|
||||
}
|
||||
}
|
||||
// Restoring cursor
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
@ -297,7 +300,7 @@ void MainWindow::populateTree()
|
||||
}
|
||||
|
||||
// Populate Listview with list of services
|
||||
void MainWindow::populateList()
|
||||
void MainWindow::populateList(int item)
|
||||
{
|
||||
QString server;
|
||||
QString service;
|
||||
@ -305,7 +308,7 @@ void MainWindow::populateList()
|
||||
int port;
|
||||
int i;
|
||||
|
||||
server = ui->khistorycombobox->currentText();
|
||||
server = ui->khistorycombobox->itemText(item);
|
||||
port = ui->portEdit->text().toUInt();
|
||||
if ((server != this->connexion.server) or (port != this->connexion.port))
|
||||
{
|
||||
@ -353,16 +356,19 @@ void MainWindow::populateList()
|
||||
this->settings.endGroup();
|
||||
this->settings.beginGroup("Hidden/" + server);
|
||||
hidden = this->settings.allKeys();
|
||||
this->settings.endGroup();
|
||||
for (i = 0; i < hidden.size(); i++)
|
||||
if (hidden.count() > 0)
|
||||
{
|
||||
service = hidden.at(i);
|
||||
//TODO detect if service is already present
|
||||
if (testServicePresence(service, false))
|
||||
for (i = 0; i < hidden.size(); i++)
|
||||
{
|
||||
ui->listWidget->addItem(service + "\n\t");
|
||||
service = hidden[i];
|
||||
//TODO detect if service is already present
|
||||
if (testServicePresence(service, false))
|
||||
{
|
||||
ui->listWidget->addItem(service + "\n\t");
|
||||
}
|
||||
}
|
||||
}
|
||||
this->settings.endGroup();
|
||||
QGuiApplication::restoreOverrideCursor(); //setting cursor to default
|
||||
}
|
||||
}
|
||||
@ -506,6 +512,7 @@ bool MainWindow::scanDir(QString server, int portN, QTreeWidgetItem *parent, QSt
|
||||
|
||||
|
||||
myProcess->start(cmd, param);
|
||||
this->rescan = true;
|
||||
|
||||
// waiting for response of the server with a timeout of 10 seconds
|
||||
do
|
||||
@ -526,7 +533,6 @@ bool MainWindow::scanDir(QString server, int portN, QTreeWidgetItem *parent, QSt
|
||||
{
|
||||
myProcess->readAllStandardOutput();
|
||||
getUserPassword(&this->connexion);
|
||||
this->rescan = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -560,9 +566,11 @@ bool MainWindow::scanDir(QString server, int portN, QTreeWidgetItem *parent, QSt
|
||||
addTreeItem(filename, size, fullsize, fileType, date, isDir, parent);
|
||||
if (passwdOk == false and !this->connexion.password.isEmpty())
|
||||
{
|
||||
this->settings.setValue("Passwords/" + this->connexion.server + "/" + this->connexion.service + "/" + this->connexion.user, this->connexion.password);
|
||||
this->settings.setValue("Passwords/" + this->connexion.server + "/" + this->connexion.service + "/" + this->connexion.user, true);
|
||||
setPassword(this->connexion.user, this->connexion.password);
|
||||
this->settings.sync();
|
||||
}
|
||||
this->rescan = false;
|
||||
}
|
||||
}
|
||||
flag = false;
|
||||
@ -574,7 +582,7 @@ bool MainWindow::scanDir(QString server, int portN, QTreeWidgetItem *parent, QSt
|
||||
{
|
||||
QMessageBox::warning(
|
||||
this,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
tr("The processus does'nt respond: ") + myProcess->errorString());
|
||||
}
|
||||
}
|
||||
@ -660,7 +668,7 @@ bool MainWindow::validateServer(QString server)
|
||||
// server-s address not valid
|
||||
QMessageBox::warning(
|
||||
this,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
tr("server does not exists" )
|
||||
);
|
||||
}
|
||||
@ -669,21 +677,23 @@ bool MainWindow::validateServer(QString server)
|
||||
}
|
||||
|
||||
// slot activated when combobox is changed
|
||||
void MainWindow::on_khistorycombobox_currentIndexChanged(int i)
|
||||
void MainWindow::on_khistorycombobox_currentIndexChanged(int item)
|
||||
{
|
||||
this->connexion.comboboxChanged = true;
|
||||
populateList();
|
||||
populateList(item);
|
||||
}
|
||||
|
||||
// slot activated when button connection is clicked
|
||||
void MainWindow::on_connectButton_clicked()
|
||||
{
|
||||
populateList();
|
||||
populateList(ui->khistorycombobox->currentIndex());
|
||||
}
|
||||
|
||||
// add parent in treeview
|
||||
void MainWindow::addTreeItem(QString name, QString fileSize, QString fullsize, QString type, QString date, bool isDir=false, QTreeWidgetItem *parent=nullptr)
|
||||
{
|
||||
QFont * font = new QFont();
|
||||
|
||||
QTreeWidgetItem *treeItem;
|
||||
if (parent != nullptr)
|
||||
{
|
||||
@ -700,6 +710,22 @@ void MainWindow::addTreeItem(QString name, QString fileSize, QString fullsize, Q
|
||||
}else
|
||||
{
|
||||
// item is a file
|
||||
if (QFile::exists(this->downloading.savePath + "/" + name))
|
||||
{
|
||||
QBrush b (Qt::green);
|
||||
treeItem->setForeground(0, b);
|
||||
treeItem->setFont(0, *font);
|
||||
}else
|
||||
{
|
||||
this->settings.beginGroup("Downloaded/");
|
||||
if (this->settings.contains(name))
|
||||
{
|
||||
QBrush b (Qt::red);
|
||||
treeItem->setForeground(0, b);
|
||||
treeItem->setFont(0, *font);
|
||||
}
|
||||
this->settings.endGroup();
|
||||
}
|
||||
treeItem->setText(1,type);
|
||||
}
|
||||
treeItem->setText(0, name);
|
||||
@ -740,7 +766,7 @@ void MainWindow::preparePopulateTree()
|
||||
this->downloading.savePath = this->settings.value(str).toString();
|
||||
}
|
||||
|
||||
getUserPassword(&this->connexion);
|
||||
//getUserPassword(&this->connexion);
|
||||
|
||||
populateTree();
|
||||
}
|
||||
@ -755,6 +781,7 @@ bool MainWindow::getUserPassword(Connexion * object)
|
||||
QString password;
|
||||
QString server;
|
||||
QString service;
|
||||
int c;
|
||||
|
||||
bool returnValue = false;
|
||||
bool ok = false;
|
||||
@ -767,7 +794,8 @@ bool MainWindow::getUserPassword(Connexion * object)
|
||||
|
||||
this->settings.beginGroup("Passwords/" + server + "/" + service);
|
||||
logins = this->settings.allKeys();
|
||||
if (logins.count() != 1)
|
||||
c = logins.count();
|
||||
if ( c != 1)
|
||||
{
|
||||
//choose login in case of multiples logins
|
||||
login = QInputDialog::getItem(this,
|
||||
@ -785,7 +813,7 @@ bool MainWindow::getUserPassword(Connexion * object)
|
||||
if (!logins.contains(login))
|
||||
{
|
||||
password = QInputDialog::getText(this,
|
||||
tr("RsyncUI Request"),
|
||||
a.applicationName() + tr(" Request"),
|
||||
tr("Enter password"), QLineEdit::Password,
|
||||
"", &ok, Qt::Popup,
|
||||
Qt::ImhNoPredictiveText);
|
||||
@ -795,7 +823,7 @@ bool MainWindow::getUserPassword(Connexion * object)
|
||||
}
|
||||
}else
|
||||
{
|
||||
password = this->settings.value(login).toString();
|
||||
password = getPassword(login);
|
||||
}
|
||||
object->user = login;
|
||||
object->password = password;
|
||||
@ -803,7 +831,7 @@ bool MainWindow::getUserPassword(Connexion * object)
|
||||
}else
|
||||
{
|
||||
object->user = logins.at(0);
|
||||
object->password = this->settings.value(object->user).toString();
|
||||
object->password = getPassword(object->user);
|
||||
returnValue = true;
|
||||
}
|
||||
this->settings.endGroup();
|
||||
@ -813,8 +841,7 @@ bool MainWindow::getUserPassword(Connexion * object)
|
||||
//Slot activated when a file is clicked in the treeview
|
||||
void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadDir)
|
||||
{
|
||||
QFuture<void> future;
|
||||
QFileDialog dialog;
|
||||
//#QFileDialog dialog;
|
||||
QTreeWidgetItem * itemR;
|
||||
QString path;
|
||||
QString str;
|
||||
@ -822,6 +849,7 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
|
||||
int sizeFromRsync;
|
||||
|
||||
itemR = item;
|
||||
this->rescan = true;
|
||||
|
||||
// assembling path from treewidget
|
||||
path = item->text(0);
|
||||
@ -862,7 +890,7 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
|
||||
{
|
||||
reply = QMessageBox::question(
|
||||
this,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
tr("File is partially downloaded. Do you want to resume download ? if no, the file will be deleted from destination directory"),
|
||||
QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel,
|
||||
QMessageBox::Cancel);
|
||||
@ -879,7 +907,7 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
|
||||
{
|
||||
reply = QMessageBox::question(
|
||||
this,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
tr("File is already downloaded. Do you want to reload it ? The old file will be deleted"),
|
||||
QMessageBox::Yes|QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
@ -916,16 +944,20 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
|
||||
{
|
||||
QMessageBox::warning(
|
||||
this,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
tr("File is already downloading" )
|
||||
);
|
||||
}
|
||||
}else
|
||||
{
|
||||
//Item is a Directory
|
||||
scanDir(this->connexion.server, this->connexion.port, item, this->connexion.service + "/" + path +"/");
|
||||
item->setExpanded(true);
|
||||
while (this->rescan)
|
||||
{
|
||||
scanDir(this->connexion.server, this->connexion.port, item, this->connexion.service + "/" + path +"/");
|
||||
item->setExpanded(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (config.autosaveCheckbox->checkState() == Qt::Checked)
|
||||
{
|
||||
saveDownloadList();
|
||||
@ -942,7 +974,7 @@ void MainWindow::startDownloading()
|
||||
|
||||
//QtConcurrent::run(&this->downloadO, &downloadFile::download, this);
|
||||
this->download();
|
||||
this->trayIcon->showMessage("RsyncUI", tr("Starting downloading\n") + this->downloading.path, QSystemTrayIcon::Information);
|
||||
this->trayIcon->showMessage(a.applicationName(), tr("Starting downloading\n") + this->downloading.path, QSystemTrayIcon::Information);
|
||||
}
|
||||
|
||||
// Slot stopping download
|
||||
@ -966,11 +998,11 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
QMessageBox::warning(
|
||||
NULL,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
tr("Rsync process crashed"));
|
||||
}
|
||||
//test result code of command (if 20 then command stopped by user)
|
||||
if (exitCode != 0)
|
||||
if (exitCode != 0 and this->stopDlAsked != true)
|
||||
{
|
||||
if (exitCode == 20)
|
||||
{
|
||||
@ -984,7 +1016,7 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
// displaying warning with exit code
|
||||
reply = QMessageBox::warning(
|
||||
this,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
rsyncErrorStrings[exitCode] + tr("\nDo you want to retry?"),
|
||||
QMessageBox::Yes|QMessageBox::No,
|
||||
QMessageBox::Yes);
|
||||
@ -993,8 +1025,8 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
retry = true;
|
||||
}
|
||||
}
|
||||
|
||||
this->trayIcon->showMessage("RsyncUI", tr("Download ") + aborted + "\n" + this->downloading.path, QSystemTrayIcon::Information);
|
||||
this->stopDlAsked = false;
|
||||
this->trayIcon->showMessage(a.applicationName(), tr("Download ") + aborted + "\n" + this->downloading.path, QSystemTrayIcon::Information);
|
||||
|
||||
// disconnecting signals to slots
|
||||
disconnect(this->downloading.process, 0, 0, 0);
|
||||
@ -1005,6 +1037,10 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
|
||||
if (retry == false)
|
||||
{
|
||||
QString filename = ui->listDownload->item(0)->text();
|
||||
pos = filename.contains(" => ");
|
||||
filename.resize(pos);
|
||||
this->settings.setValue("Downloaded/" + ui->listDownload->item(0)->text(), true);
|
||||
delete ui->listDownload->takeItem(0);
|
||||
}
|
||||
this->downloading.clear();
|
||||
@ -1031,14 +1067,14 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
// setting savepath from saved settings
|
||||
this->downloading.savePath = this->settings.value(str).toString();
|
||||
sleep(2);
|
||||
startDownloading();
|
||||
}else
|
||||
{
|
||||
// no save path
|
||||
if(!on_DefaultSaveFolder_triggered())
|
||||
{
|
||||
cout << "Error no save path so deleting download";
|
||||
//downloadFinished();
|
||||
cout << "Error no save path so removing download";
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1060,13 +1096,14 @@ void MainWindow::on_listDownload_itemClicked(QListWidgetItem *item)
|
||||
// first line clicked on download list
|
||||
reply = QMessageBox::question(
|
||||
this,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
tr("Do you want to stop downloading and delete this file from download queue ?"),
|
||||
QMessageBox::Yes|QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
if (reply == QMessageBox::Yes)
|
||||
{
|
||||
// stopping download
|
||||
this->stopDlAsked = true;
|
||||
emit (stopDownloading(this->downloading.process));
|
||||
}
|
||||
}else
|
||||
@ -1074,7 +1111,7 @@ void MainWindow::on_listDownload_itemClicked(QListWidgetItem *item)
|
||||
// not first line on download list
|
||||
reply = QMessageBox::question(
|
||||
this,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
tr("Do you want to delete this file from download queue ?"),
|
||||
QMessageBox::Yes|QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
@ -1083,7 +1120,6 @@ void MainWindow::on_listDownload_itemClicked(QListWidgetItem *item)
|
||||
// removing line from download list
|
||||
ui->listDownload->removeItemWidget(item);
|
||||
delete item;
|
||||
|
||||
}
|
||||
}
|
||||
if (config.autosaveCheckbox->checkState() == Qt::Checked)
|
||||
@ -1164,7 +1200,7 @@ bool MainWindow::on_DefaultSaveFolder_triggered()
|
||||
{
|
||||
QMessageBox::warning(
|
||||
NULL,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
tr("Since the save path is linked to service, you need to select a service before you can select a folder"));
|
||||
return false;
|
||||
}
|
||||
@ -1302,7 +1338,7 @@ void MainWindow::on_actionDownload_triggered()
|
||||
{
|
||||
QMessageBox::warning(
|
||||
this,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
errorString,
|
||||
QMessageBox::Ok,
|
||||
QMessageBox::Ok);
|
||||
@ -1320,34 +1356,6 @@ void MainWindow::on_actionExit_triggered()
|
||||
quitApp();
|
||||
}
|
||||
|
||||
void MainWindow::on_loginBox_accepted()
|
||||
{
|
||||
/*Connexion * conn = this->passwordConnexion;
|
||||
|
||||
if (!loginD.loginEdit->currentText().isEmpty())
|
||||
{
|
||||
QString path;
|
||||
conn->user = loginD.loginEdit->currentText();
|
||||
path = "Passwords/" + conn->server + "/" + conn->service + "/" + conn->user;
|
||||
|
||||
if (!loginD.passwordEdit->text().isEmpty())
|
||||
{
|
||||
conn->password = loginD.passwordEdit->text();
|
||||
this->settings.setValue("Passwords/" + conn->server + "/" + conn->service + "/" + conn->user, conn->password);
|
||||
this->settings.sync();
|
||||
if (this->rescan == true)
|
||||
{
|
||||
this->rescan = false;
|
||||
populateTree();
|
||||
}
|
||||
}else if (this->settings.contains(path))
|
||||
{
|
||||
conn->password = this->settings.value(path).toString();
|
||||
}
|
||||
}
|
||||
emit passwordReady();*/
|
||||
}
|
||||
|
||||
void MainWindow::setDlSpeed(QString speed)
|
||||
{
|
||||
speed.squeeze();
|
||||
@ -1358,13 +1366,14 @@ void MainWindow::on_actionHiddenService_triggered()
|
||||
QInputDialog hiddenFolderDialog;
|
||||
|
||||
bool ok;
|
||||
QString text = QInputDialog::getText(this, tr("RsyncUI Request"),
|
||||
QString text = QInputDialog::getText(this, a.applicationName() + tr(" Request"),
|
||||
tr("Hidden service name"), QLineEdit::Normal,
|
||||
"test", &ok);
|
||||
if (ok && !text.isEmpty())
|
||||
{
|
||||
this->connexion.service = text;
|
||||
this->settings.setValue("Hidden/" + this->connexion.server + "/" + text, true);
|
||||
this->settings.setValue("Hidden/" + this->connexion.server + '/' + text, true);
|
||||
ui->listWidget->addItem(text + "\n\t");
|
||||
preparePopulateTree();
|
||||
}
|
||||
}
|
||||
|
17
mainwindow.h
17
mainwindow.h
@ -7,6 +7,7 @@
|
||||
#include "ui_about.h"
|
||||
#include "downloadfile.h"
|
||||
#include "tools.h"
|
||||
#include "password.h"
|
||||
#include <QMainWindow>
|
||||
#include <string>
|
||||
#include <QTreeWidgetItem>
|
||||
@ -24,8 +25,6 @@
|
||||
#include <cstdio>
|
||||
#include <QMessageBox>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <QFuture>
|
||||
#include <qtconcurrentrun.h>
|
||||
#include <QFileDialog>
|
||||
#include <QThread>
|
||||
#include <QProgressDialog>
|
||||
@ -89,8 +88,7 @@ class Downloading
|
||||
class About
|
||||
{
|
||||
public:
|
||||
QString title = "RsyncUI";
|
||||
QString version = "2.9.2";
|
||||
QString version = "2.11.2";
|
||||
QString author = "Daniel TARTAVEL-JEANNOT";
|
||||
QString licence = "GPL_V3";
|
||||
QString description;
|
||||
@ -106,6 +104,7 @@ class MainWindow : public QMainWindow
|
||||
Ui::MainWindow *ui;
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
// passwdManager;
|
||||
QProgressDialog *progress;
|
||||
Connexion connexion;
|
||||
Connexion downloading;
|
||||
@ -119,7 +118,7 @@ class MainWindow : public QMainWindow
|
||||
QSystemTrayIcon * trayIcon;
|
||||
QString icon = "/usr/share/icons/RsyncUI.png";
|
||||
bool rescan = false;
|
||||
bool passwordReturned;
|
||||
bool stopDlAsked;
|
||||
|
||||
QList<QString> UnitText {
|
||||
tr("B"),
|
||||
@ -149,7 +148,7 @@ class MainWindow : public QMainWindow
|
||||
|
||||
void displayTree();
|
||||
void populateTree();
|
||||
void populateList();
|
||||
void populateList(int);
|
||||
void listServices();
|
||||
bool validateServer(QString server);
|
||||
bool isIpAddress(QString server);
|
||||
@ -169,6 +168,8 @@ class MainWindow : public QMainWindow
|
||||
bool getUserPassword(Connexion *);
|
||||
void preparePopulateTree();
|
||||
bool testServicePresence(QString, bool=false);
|
||||
void passwordStore (QString account, QString password);
|
||||
QString passwordGet (QString account);
|
||||
|
||||
private slots:
|
||||
|
||||
@ -214,11 +215,9 @@ class MainWindow : public QMainWindow
|
||||
|
||||
void setDlSpeed(QString speed);
|
||||
|
||||
void on_loginBox_accepted();
|
||||
|
||||
void on_actionHiddenService_triggered();
|
||||
|
||||
signals:
|
||||
signals:
|
||||
void stopDownloading(QProcess *);
|
||||
void progressSignal(int);
|
||||
void speed(QString);
|
||||
|
82
password.cpp
82
password.cpp
@ -2,58 +2,54 @@
|
||||
#include "password.h"
|
||||
#include <qt5keychain/keychain.h>
|
||||
#include <qt5keychain/qkeychain_export.h>
|
||||
#include <QSettings>
|
||||
|
||||
using namespace std;
|
||||
extern QApplication a;
|
||||
|
||||
/*Password::Password()
|
||||
QString appName = "RsyncUI";
|
||||
|
||||
static QSettings sett{appName, appName};
|
||||
|
||||
void setPassword(QString account, QString pass)
|
||||
{
|
||||
this->passwdJob->setObjectName(this->appName);
|
||||
this->passwdJob->setAutoDelete(false);
|
||||
this->passwdJob->connect(this->passwdJob, SIGNAL(finished(QKeychain::Job*)), this, SLOT(finished(QKeychain::Job*)));
|
||||
//this->readPass->connect(this->readPass, SIGNAL(finished()))
|
||||
QKeychain::WritePasswordJob write(appName);
|
||||
write.setSettings(&sett);
|
||||
// write.setAutoDelete(false);
|
||||
write.setKey(account);
|
||||
write.setTextData(pass);
|
||||
|
||||
QEventLoop loop;
|
||||
write.connect(&write, &QKeychain::WritePasswordJob::finished, &loop, &QEventLoop::quit);
|
||||
|
||||
write.start();
|
||||
loop.exec();
|
||||
|
||||
if(write.error())
|
||||
cout << "Error writing key1. Error: " << write.errorString().toStdString();
|
||||
}
|
||||
|
||||
void Password::store (QString account, QString password)
|
||||
QString getPassword(const QString& name)
|
||||
{
|
||||
this->passwdJob->setKey(account);
|
||||
this->passwdJob->setTextData(password);
|
||||
this->passwdJob->start();
|
||||
}
|
||||
QKeychain::ReadPasswordJob readPass(appName);
|
||||
readPass.setSettings(&sett);
|
||||
// readPass.setAutoDelete(false);
|
||||
readPass.setKey(name);
|
||||
|
||||
QString Password::read(QString account)
|
||||
{
|
||||
this->readPass->setObjectName("");
|
||||
this->readPass->setKey(account);
|
||||
this->readPass->start();
|
||||
}
|
||||
QEventLoop loop;
|
||||
readPass.connect(&readPass, &QKeychain::ReadPasswordJob::finished, &loop, &QEventLoop::quit);
|
||||
|
||||
bool Password::remove(QString)
|
||||
{
|
||||
readPass.start();
|
||||
loop.exec();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Password::finished(QKeychain::Job * passwdJob)
|
||||
{
|
||||
if(passwdJob->error()) {
|
||||
QMessageBox::warning(
|
||||
NULL,
|
||||
"RsyncUI",
|
||||
QString(this->mw->tr("Error: Unable to save password!")) + QString(passwdJob->error()));
|
||||
if(readPass.error())
|
||||
{
|
||||
cout << "KeyHandler~Error reading decrypt Pass. Error: " + readPass.errorString() . toStdString() << endl;
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
QString data = readPass.textData();
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
void Password::readReturn()
|
||||
{
|
||||
if(this->readPass->error())
|
||||
{
|
||||
QMessageBox::warning(
|
||||
NULL,
|
||||
"RsyncUI",
|
||||
QString(this->mw->tr("Error: Unable to read password!")) + QString(readPass->error()));
|
||||
}else
|
||||
{
|
||||
this->password = readPass->textData();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
14
password.h
14
password.h
@ -5,7 +5,12 @@
|
||||
#include <qt5keychain/keychain.h>
|
||||
#include <qt5keychain/qkeychain_export.h>
|
||||
|
||||
class Password : QObject
|
||||
extern QApplication a;
|
||||
|
||||
void setPassword(QString account, QString pass);
|
||||
QString getPassword(const QString& name);
|
||||
|
||||
/*class Password : QObject
|
||||
{
|
||||
public:
|
||||
QString appName;
|
||||
@ -13,6 +18,7 @@ class Password : QObject
|
||||
QKeychain::ReadPasswordJob * readPass;
|
||||
MainWindow * mw;
|
||||
QString password;
|
||||
QSettings passwdSettings{a.applicationName(),a.applicationName()};
|
||||
|
||||
Password();
|
||||
~Password();
|
||||
@ -22,8 +28,8 @@ class Password : QObject
|
||||
bool remove(QString);
|
||||
|
||||
private slots:
|
||||
void finished(QKeychain::Job*);
|
||||
void readReturn();
|
||||
};
|
||||
void storeFinished();
|
||||
void readFinished();
|
||||
};*/
|
||||
|
||||
#endif // PASSWORD_H
|
||||
|
@ -6,6 +6,7 @@ using namespace std;
|
||||
#define WRITE 1
|
||||
|
||||
extern QMap<int, QString> rsyncErrorStrings;
|
||||
extern QApplication a;
|
||||
|
||||
//Take a string and explode it in array
|
||||
// s => string to explode
|
||||
@ -47,16 +48,17 @@ const vector<string> explode(const string& s, const char& c, int n = 0)
|
||||
// return true in case of error
|
||||
bool testRsyncReturn(MainWindow * w, QProcess * myProcess)
|
||||
{
|
||||
if (myProcess->exitStatus() != 0)
|
||||
if (myProcess->exitStatus() != 0 and w->stopDlAsked != true)
|
||||
{
|
||||
QMessageBox::warning(
|
||||
w,
|
||||
"RsyncUI",
|
||||
a.applicationName(),
|
||||
myProcess->errorString(),
|
||||
QMessageBox::Ok,
|
||||
QMessageBox::Ok);
|
||||
return true;
|
||||
}
|
||||
w->stopDlAsked = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user