Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
c9f85354a6 | |||
ab91309abd | |||
7f767b0576 | |||
9229d3523e | |||
7770813647 | |||
4b434fc393 | |||
5804e43d1f | |||
d70d081139 | |||
9f9c5c19a3 | |||
4dbfa8fa97 | |||
fe74ab906f | |||
295c914b12 | |||
434b430869 | |||
0648a06dbc | |||
ff7a75e168 | |||
149eb24590 | |||
012573f89d | |||
eb7795c791 | |||
d1e45b8ba8 | |||
7546aedec2 | |||
a23ffb6bbe | |||
13c5c3788f | |||
cb384e1c51 |
728
Makefile
Normal file
728
Makefile
Normal file
@ -0,0 +1,728 @@
|
||||
#############################################################################
|
||||
# Makefile for building: RsyncUI
|
||||
# Generated by qmake (3.1) (Qt 5.15.2)
|
||||
# Project: RsyncUI.pro
|
||||
# Template: app
|
||||
# Command: /usr/bin/qmake -o Makefile RsyncUI.pro
|
||||
#############################################################################
|
||||
|
||||
MAKEFILE = Makefile
|
||||
|
||||
EQ = =
|
||||
|
||||
####### Compiler, tools and options
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
DEFINES = -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_XML_LIB -DQT_DBUS_LIB -DQT_CORE_LIB
|
||||
CFLAGS = -pipe -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -fno-strict-aliasing -DPIC -fPIC -Wall -Wextra -D_REENTRANT -fPIC $(DEFINES)
|
||||
CXXFLAGS = -pipe -std=gnu++0x -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -fno-strict-aliasing -DPIC -fPIC -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC $(DEFINES)
|
||||
INCPATH = -I. -I/usr/include/KF5 -I/usr/include/KF5/KItemViews -I/usr/include/KF5/KCompletion -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/KF5/KConfigGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtConcurrent -I/usr/include/KF5/KConfigCore -I/usr/include/qt5/QtXml -I/usr/include/KF5/KCoreAddons -I/usr/include/KF5/KDBusAddons -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore -I. -I. -I/usr/lib64/qt5/mkspecs/linux-g++
|
||||
QMAKE = /usr/bin/qmake
|
||||
DEL_FILE = rm -f
|
||||
CHK_DIR_EXISTS= test -d
|
||||
MKDIR = mkdir -p
|
||||
COPY = cp -f
|
||||
COPY_FILE = cp -f
|
||||
COPY_DIR = cp -f -R
|
||||
INSTALL_FILE = install -m 644 -p
|
||||
INSTALL_PROGRAM = install -m 755 -p
|
||||
INSTALL_DIR = cp -f -R
|
||||
QINSTALL = /usr/bin/qmake -install qinstall
|
||||
QINSTALL_PROGRAM = /usr/bin/qmake -install qinstall -exe
|
||||
DEL_FILE = rm -f
|
||||
SYMLINK = ln -f -s
|
||||
DEL_DIR = rmdir
|
||||
MOVE = mv -f
|
||||
TAR = tar -cf
|
||||
COMPRESS = gzip -9f
|
||||
DISTNAME = RsyncUI1.0.0
|
||||
DISTDIR = /home/daniel/develop/RsyncUI/.tmp/RsyncUI1.0.0
|
||||
LINK = g++
|
||||
LFLAGS = -Wl,-O1
|
||||
LIBS = $(SUBLIBS) /usr/lib64/libKF5ItemViews.so /usr/lib64/libKF5Completion.so /usr/lib64/libQt5Widgets.so /usr/lib64/libKF5ConfigGui.so /usr/lib64/libQt5Gui.so /usr/lib64/libQt5Concurrent.so /usr/lib64/libKF5ConfigCore.so /usr/lib64/libQt5Xml.so /usr/lib64/libKF5CoreAddons.so /usr/lib64/libKF5DBusAddons.so /usr/lib64/libQt5DBus.so /usr/lib64/libQt5Core.so -lGL -lpthread
|
||||
AR = ar cqs
|
||||
RANLIB =
|
||||
SED = sed
|
||||
STRIP = strip
|
||||
|
||||
####### Output directory
|
||||
|
||||
OBJECTS_DIR = ./
|
||||
|
||||
####### Files
|
||||
|
||||
SOURCES = downloadfile.cpp \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
tools.cpp moc_downloadfile.cpp \
|
||||
moc_mainwindow.cpp
|
||||
OBJECTS = downloadfile.o \
|
||||
main.o \
|
||||
mainwindow.o \
|
||||
tools.o \
|
||||
moc_downloadfile.o \
|
||||
moc_mainwindow.o
|
||||
DIST = /usr/lib64/qt5/mkspecs/features/spec_pre.prf \
|
||||
/usr/lib64/qt5/mkspecs/common/unix.conf \
|
||||
/usr/lib64/qt5/mkspecs/common/linux.conf \
|
||||
/usr/lib64/qt5/mkspecs/common/sanitize.conf \
|
||||
/usr/lib64/qt5/mkspecs/common/gcc-base.conf \
|
||||
/usr/lib64/qt5/mkspecs/common/gcc-base-unix.conf \
|
||||
/usr/lib64/qt5/mkspecs/common/g++-base.conf \
|
||||
/usr/lib64/qt5/mkspecs/common/g++-unix.conf \
|
||||
/usr/lib64/qt5/mkspecs/qconfig.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_Attica.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KActivities.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KArchive.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KAuth.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KAuthCore.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KBookmarks.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCMUtils.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCodecs.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCompletion.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KConfigCore.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KConfigGui.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KConfigWidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCoreAddons.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCrash.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KDBusAddons.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KDeclarative.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KGlobalAccel.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KGuiAddons.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KI18n.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIconThemes.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIOCore.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIOFileWidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIOGui.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIOWidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KItemModels.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KItemViews.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KJobWidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNewStuff.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNewStuffCore.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNotifications.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNotifyConfig.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNTLM.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KParts.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KRunner.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KService.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KSyntaxHighlighting.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KTextEditor.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KTextWidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KWaylandClient.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KWaylandServer.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KWidgetsAddons.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KWindowSystem.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KXmlGui.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_concurrent.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_core.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_core_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_dbus.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_gui.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_gui_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_help.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_help_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_network.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_network_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_opengl.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_pdf.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_pdf_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_pdfwidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_pdfwidgets_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_positioning.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_positioning_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_positioningquick.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_positioningquick_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_printsupport.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qml.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qml_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmldebug_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmldevtools_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmlmodels.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmlmodels_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmltest.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmltest_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_quick.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_quick_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_quickwidgets_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_sql.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_sql_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_svg.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_svg_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_testlib.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_texttospeech.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_texttospeech_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webchannel.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webchannel_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webengine.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webengine_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginecore.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginecore_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginecoreheaders_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginewidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginewidgets_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_widgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_x11extras.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_x11extras_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_xml.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_xml_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_QuickAddons.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_Solid.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_SonnetCore.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_SonnetUi.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_ThreadWeaver.pri \
|
||||
/usr/lib64/qt5/mkspecs/features/qt_functions.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/qt_config.prf \
|
||||
/usr/lib64/qt5/mkspecs/linux-g++/qmake.conf \
|
||||
/usr/lib64/qt5/mkspecs/features/spec_post.prf \
|
||||
.qmake.stash \
|
||||
/usr/lib64/qt5/mkspecs/features/exclusive_builds.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/toolchain.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/default_pre.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/resolve_config.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/default_post.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/warn_on.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/qt.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/resources_functions.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/resources.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/moc.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/dbuscommon.pri \
|
||||
/usr/lib64/qt5/mkspecs/features/dbusinterfaces.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/dbusadaptors.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/unix/opengl.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/uic.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/unix/thread.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/qmake_use.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/file_copies.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/testcase_targets.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/exceptions.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/yacc.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/lex.prf \
|
||||
RsyncUI.pro downloadfile.h \
|
||||
mainwindow.h \
|
||||
tools.h downloadfile.cpp \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
tools.cpp
|
||||
QMAKE_TARGET = RsyncUI
|
||||
DESTDIR =
|
||||
TARGET = RsyncUI
|
||||
|
||||
|
||||
first: all
|
||||
####### Build rules
|
||||
|
||||
RsyncUI: ui_mainwindow.h $(OBJECTS)
|
||||
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
|
||||
|
||||
Makefile: RsyncUI.pro /usr/lib64/qt5/mkspecs/linux-g++/qmake.conf /usr/lib64/qt5/mkspecs/features/spec_pre.prf \
|
||||
/usr/lib64/qt5/mkspecs/common/unix.conf \
|
||||
/usr/lib64/qt5/mkspecs/common/linux.conf \
|
||||
/usr/lib64/qt5/mkspecs/common/sanitize.conf \
|
||||
/usr/lib64/qt5/mkspecs/common/gcc-base.conf \
|
||||
/usr/lib64/qt5/mkspecs/common/gcc-base-unix.conf \
|
||||
/usr/lib64/qt5/mkspecs/common/g++-base.conf \
|
||||
/usr/lib64/qt5/mkspecs/common/g++-unix.conf \
|
||||
/usr/lib64/qt5/mkspecs/qconfig.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_Attica.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KActivities.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KArchive.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KAuth.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KAuthCore.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KBookmarks.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCMUtils.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCodecs.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCompletion.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KConfigCore.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KConfigGui.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KConfigWidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCoreAddons.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCrash.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KDBusAddons.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KDeclarative.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KGlobalAccel.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KGuiAddons.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KI18n.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIconThemes.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIOCore.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIOFileWidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIOGui.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIOWidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KItemModels.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KItemViews.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KJobWidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNewStuff.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNewStuffCore.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNotifications.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNotifyConfig.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNTLM.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KParts.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KRunner.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KService.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KSyntaxHighlighting.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KTextEditor.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KTextWidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KWaylandClient.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KWaylandServer.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KWidgetsAddons.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KWindowSystem.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KXmlGui.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_concurrent.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_core.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_core_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_dbus.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_gui.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_gui_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_help.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_help_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_network.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_network_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_opengl.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_pdf.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_pdf_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_pdfwidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_pdfwidgets_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_positioning.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_positioning_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_positioningquick.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_positioningquick_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_printsupport.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qml.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qml_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmldebug_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmldevtools_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmlmodels.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmlmodels_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmltest.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmltest_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_quick.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_quick_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_quickwidgets_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_sql.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_sql_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_svg.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_svg_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_testlib.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_texttospeech.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_texttospeech_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webchannel.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webchannel_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webengine.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webengine_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginecore.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginecore_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginecoreheaders_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginewidgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginewidgets_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_widgets.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_x11extras.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_x11extras_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_xml.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_xml_private.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_QuickAddons.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_Solid.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_SonnetCore.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_SonnetUi.pri \
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_ThreadWeaver.pri \
|
||||
/usr/lib64/qt5/mkspecs/features/qt_functions.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/qt_config.prf \
|
||||
/usr/lib64/qt5/mkspecs/linux-g++/qmake.conf \
|
||||
/usr/lib64/qt5/mkspecs/features/spec_post.prf \
|
||||
.qmake.stash \
|
||||
/usr/lib64/qt5/mkspecs/features/exclusive_builds.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/toolchain.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/default_pre.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/resolve_config.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/default_post.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/warn_on.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/qt.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/resources_functions.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/resources.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/moc.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/dbuscommon.pri \
|
||||
/usr/lib64/qt5/mkspecs/features/dbusinterfaces.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/dbusadaptors.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/unix/opengl.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/uic.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/unix/thread.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/qmake_use.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/file_copies.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/testcase_targets.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/exceptions.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/yacc.prf \
|
||||
/usr/lib64/qt5/mkspecs/features/lex.prf \
|
||||
RsyncUI.pro
|
||||
$(QMAKE) -o Makefile RsyncUI.pro
|
||||
/usr/lib64/qt5/mkspecs/features/spec_pre.prf:
|
||||
/usr/lib64/qt5/mkspecs/common/unix.conf:
|
||||
/usr/lib64/qt5/mkspecs/common/linux.conf:
|
||||
/usr/lib64/qt5/mkspecs/common/sanitize.conf:
|
||||
/usr/lib64/qt5/mkspecs/common/gcc-base.conf:
|
||||
/usr/lib64/qt5/mkspecs/common/gcc-base-unix.conf:
|
||||
/usr/lib64/qt5/mkspecs/common/g++-base.conf:
|
||||
/usr/lib64/qt5/mkspecs/common/g++-unix.conf:
|
||||
/usr/lib64/qt5/mkspecs/qconfig.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_Attica.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KActivities.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KArchive.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KAuth.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KAuthCore.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KBookmarks.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCMUtils.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCodecs.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCompletion.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KConfigCore.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KConfigGui.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KConfigWidgets.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCoreAddons.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KCrash.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KDBusAddons.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KDeclarative.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KGlobalAccel.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KGuiAddons.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KI18n.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIconThemes.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIOCore.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIOFileWidgets.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIOGui.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KIOWidgets.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KItemModels.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KItemViews.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KJobWidgets.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNewStuff.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNewStuffCore.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNotifications.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNotifyConfig.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KNTLM.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KParts.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KRunner.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KService.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KSyntaxHighlighting.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KTextEditor.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KTextWidgets.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KWaylandClient.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KWaylandServer.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KWidgetsAddons.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KWindowSystem.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_KXmlGui.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_concurrent.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_concurrent_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_core.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_core_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_dbus.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_dbus_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_edid_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_egl_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_fb_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_glx_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_gui.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_gui_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_help.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_help_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_input_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_kms_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_network.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_network_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_opengl.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_opengl_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_openglextensions.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_pdf.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_pdf_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_pdfwidgets.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_pdfwidgets_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_positioning.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_positioning_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_positioningquick.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_positioningquick_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_printsupport.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_printsupport_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qml.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qml_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmldebug_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmldevtools_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmlmodels.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmlmodels_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmltest.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_qmltest_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_quick.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_quick_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_quickwidgets.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_quickwidgets_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_service_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_sql.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_sql_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_svg.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_svg_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_testlib.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_testlib_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_texttospeech.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_texttospeech_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_theme_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webchannel.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webchannel_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webengine.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webengine_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginecore.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginecore_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginecoreheaders_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginewidgets.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_webenginewidgets_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_widgets.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_widgets_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_x11extras.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_x11extras_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_xml.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_lib_xml_private.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_QuickAddons.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_Solid.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_SonnetCore.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_SonnetUi.pri:
|
||||
/usr/lib64/qt5/mkspecs/modules/qt_ThreadWeaver.pri:
|
||||
/usr/lib64/qt5/mkspecs/features/qt_functions.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/qt_config.prf:
|
||||
/usr/lib64/qt5/mkspecs/linux-g++/qmake.conf:
|
||||
/usr/lib64/qt5/mkspecs/features/spec_post.prf:
|
||||
.qmake.stash:
|
||||
/usr/lib64/qt5/mkspecs/features/exclusive_builds.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/toolchain.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/default_pre.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/resolve_config.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/default_post.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/warn_on.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/qt.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/resources_functions.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/resources.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/moc.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/dbuscommon.pri:
|
||||
/usr/lib64/qt5/mkspecs/features/dbusinterfaces.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/dbusadaptors.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/unix/opengl.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/uic.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/unix/thread.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/qmake_use.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/file_copies.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/testcase_targets.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/exceptions.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/yacc.prf:
|
||||
/usr/lib64/qt5/mkspecs/features/lex.prf:
|
||||
RsyncUI.pro:
|
||||
qmake: FORCE
|
||||
@$(QMAKE) -o Makefile RsyncUI.pro
|
||||
|
||||
qmake_all: FORCE
|
||||
|
||||
|
||||
all: Makefile RsyncUI
|
||||
|
||||
dist: distdir FORCE
|
||||
(cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)
|
||||
|
||||
distdir: FORCE
|
||||
@test -d $(DISTDIR) || mkdir -p $(DISTDIR)
|
||||
$(COPY_FILE) --parents $(DIST) $(DISTDIR)/
|
||||
$(COPY_FILE) --parents /usr/lib64/qt5/mkspecs/features/data/dummy.cpp $(DISTDIR)/
|
||||
$(COPY_FILE) --parents downloadfile.h mainwindow.h tools.h $(DISTDIR)/
|
||||
$(COPY_FILE) --parents downloadfile.cpp main.cpp mainwindow.cpp tools.cpp $(DISTDIR)/
|
||||
$(COPY_FILE) --parents mainwindow.ui $(DISTDIR)/
|
||||
$(COPY_FILE) --parents languages/RsyncUI_fr_FR.ts $(DISTDIR)/
|
||||
|
||||
|
||||
clean: compiler_clean
|
||||
-$(DEL_FILE) $(OBJECTS)
|
||||
-$(DEL_FILE) *~ core *.core
|
||||
|
||||
|
||||
distclean: clean
|
||||
-$(DEL_FILE) $(TARGET)
|
||||
-$(DEL_FILE) .qmake.stash
|
||||
-$(DEL_FILE) Makefile
|
||||
|
||||
|
||||
####### Sub-libraries
|
||||
|
||||
mocclean: compiler_moc_header_clean compiler_moc_objc_header_clean compiler_moc_source_clean
|
||||
|
||||
mocables: compiler_moc_header_make_all compiler_moc_objc_header_make_all compiler_moc_source_make_all
|
||||
|
||||
check: first
|
||||
|
||||
benchmark: first
|
||||
|
||||
compiler_rcc_make_all:
|
||||
compiler_rcc_clean:
|
||||
compiler_moc_predefs_make_all: moc_predefs.h
|
||||
compiler_moc_predefs_clean:
|
||||
-$(DEL_FILE) moc_predefs.h
|
||||
moc_predefs.h: /usr/lib64/qt5/mkspecs/features/data/dummy.cpp
|
||||
g++ -pipe -std=gnu++0x -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -fno-strict-aliasing -DPIC -fPIC -std=gnu++11 -Wall -Wextra -dM -E -o moc_predefs.h /usr/lib64/qt5/mkspecs/features/data/dummy.cpp
|
||||
|
||||
compiler_moc_header_make_all: moc_downloadfile.cpp moc_mainwindow.cpp
|
||||
compiler_moc_header_clean:
|
||||
-$(DEL_FILE) moc_downloadfile.cpp moc_mainwindow.cpp
|
||||
moc_downloadfile.cpp: downloadfile.h \
|
||||
ui_mainwindow.h \
|
||||
moc_predefs.h \
|
||||
/usr/lib64/qt5/bin/moc
|
||||
/usr/lib64/qt5/bin/moc $(DEFINES) --include /home/daniel/develop/RsyncUI/moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/home/daniel/develop/RsyncUI -I/usr/include/KF5 -I/usr/include/KF5/KItemViews -I/usr/include/KF5/KCompletion -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/KF5/KConfigGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtConcurrent -I/usr/include/KF5/KConfigCore -I/usr/include/qt5/QtXml -I/usr/include/KF5/KCoreAddons -I/usr/include/KF5/KDBusAddons -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore -I/usr/include/c++/10 -I/usr/include/c++/10/x86_64-mageia-linux-gnu -I/usr/include/c++/10/backward -I/usr/lib/gcc/x86_64-mageia-linux-gnu/10/include -I/usr/local/include -I/usr/include downloadfile.h -o moc_downloadfile.cpp
|
||||
|
||||
moc_mainwindow.cpp: mainwindow.h \
|
||||
downloadfile.h \
|
||||
ui_mainwindow.h \
|
||||
moc_predefs.h \
|
||||
/usr/lib64/qt5/bin/moc
|
||||
/usr/lib64/qt5/bin/moc $(DEFINES) --include /home/daniel/develop/RsyncUI/moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/home/daniel/develop/RsyncUI -I/usr/include/KF5 -I/usr/include/KF5/KItemViews -I/usr/include/KF5/KCompletion -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/KF5/KConfigGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtConcurrent -I/usr/include/KF5/KConfigCore -I/usr/include/qt5/QtXml -I/usr/include/KF5/KCoreAddons -I/usr/include/KF5/KDBusAddons -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore -I/usr/include/c++/10 -I/usr/include/c++/10/x86_64-mageia-linux-gnu -I/usr/include/c++/10/backward -I/usr/lib/gcc/x86_64-mageia-linux-gnu/10/include -I/usr/local/include -I/usr/include mainwindow.h -o moc_mainwindow.cpp
|
||||
|
||||
compiler_moc_objc_header_make_all:
|
||||
compiler_moc_objc_header_clean:
|
||||
compiler_moc_source_make_all:
|
||||
compiler_moc_source_clean:
|
||||
compiler_uic_make_all: ui_mainwindow.h
|
||||
compiler_uic_clean:
|
||||
-$(DEL_FILE) ui_mainwindow.h
|
||||
ui_mainwindow.h: mainwindow.ui \
|
||||
/usr/lib64/qt5/bin/uic \
|
||||
/usr/include/KF5/KCompletion/kcombobox.h \
|
||||
/usr/include/KF5/KCompletion/khistorycombobox.h \
|
||||
/usr/include/KF5/KCompletion/klineedit.h \
|
||||
/usr/include/KF5/KItemViews/ktreewidgetsearchline.h
|
||||
/usr/lib64/qt5/bin/uic mainwindow.ui -o ui_mainwindow.h
|
||||
|
||||
compiler_yacc_decl_make_all:
|
||||
compiler_yacc_decl_clean:
|
||||
compiler_yacc_impl_make_all:
|
||||
compiler_yacc_impl_clean:
|
||||
compiler_lex_make_all:
|
||||
compiler_lex_clean:
|
||||
compiler_clean: compiler_moc_predefs_clean compiler_moc_header_clean compiler_uic_clean
|
||||
|
||||
####### Compile
|
||||
|
||||
downloadfile.o: downloadfile.cpp mainwindow.h \
|
||||
downloadfile.h \
|
||||
ui_mainwindow.h \
|
||||
tools.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o downloadfile.o downloadfile.cpp
|
||||
|
||||
main.o: main.cpp mainwindow.h \
|
||||
downloadfile.h \
|
||||
ui_mainwindow.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
|
||||
|
||||
mainwindow.o: mainwindow.cpp mainwindow.h \
|
||||
downloadfile.h \
|
||||
ui_mainwindow.h \
|
||||
tools.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp
|
||||
|
||||
tools.o: tools.cpp mainwindow.h \
|
||||
downloadfile.h \
|
||||
ui_mainwindow.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tools.o tools.cpp
|
||||
|
||||
moc_downloadfile.o: moc_downloadfile.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_downloadfile.o moc_downloadfile.cpp
|
||||
|
||||
moc_mainwindow.o: moc_mainwindow.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp
|
||||
|
||||
####### Install
|
||||
|
||||
install_target: first FORCE
|
||||
@test -d $(INSTALL_ROOT)/usr/bin/ || mkdir -p $(INSTALL_ROOT)/usr/bin/
|
||||
$(QINSTALL_PROGRAM) $(QMAKE_TARGET) $(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET)
|
||||
-$(STRIP) $(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET)
|
||||
|
||||
uninstall_target: FORCE
|
||||
-$(DEL_FILE) $(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET)
|
||||
-$(DEL_DIR) $(INSTALL_ROOT)/usr/bin/
|
||||
|
||||
|
||||
install_lang: first FORCE
|
||||
@test -d $(INSTALL_ROOT)/languages || mkdir -p $(INSTALL_ROOT)/languages
|
||||
$(QINSTALL) /home/daniel/develop/RsyncUI/languages/RsyncUI_fr_FR.qm $(INSTALL_ROOT)/languages/RsyncUI_fr_FR.qm
|
||||
$(QINSTALL) /home/daniel/develop/RsyncUI/languages/RsyncUI_fr_FR.ts $(INSTALL_ROOT)/languages/RsyncUI_fr_FR.ts
|
||||
|
||||
uninstall_lang: FORCE
|
||||
-$(DEL_FILE) -r $(INSTALL_ROOT)/languages/RsyncUI_fr_FR.ts
|
||||
-$(DEL_FILE) -r $(INSTALL_ROOT)/languages/RsyncUI_fr_FR.qm
|
||||
-$(DEL_DIR) $(INSTALL_ROOT)/languages/
|
||||
|
||||
|
||||
install: install_target install_lang FORCE
|
||||
|
||||
uninstall: uninstall_target uninstall_lang FORCE
|
||||
|
||||
FORCE:
|
||||
|
5
README_FR.md
Normal file
5
README_FR.md
Normal file
@ -0,0 +1,5 @@
|
||||
# RsyncUI
|
||||
|
||||
client Rsync - QT5 - KDE
|
||||
|
||||
#Compilation:
|
15
RsyncUI.desktop
Normal file
15
RsyncUI.desktop
Normal file
@ -0,0 +1,15 @@
|
||||
[Desktop Entry]
|
||||
|
||||
Name=RsyncUI
|
||||
GenericName=rsync client
|
||||
Comment=Client for rsync servers
|
||||
Comment[fr]=Client pour serveur rsync
|
||||
Version=1.0
|
||||
Exec=RsyncUI
|
||||
Icon=
|
||||
Type=Application
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
Categories=Network
|
||||
Keywords=internet,rsync
|
||||
|
BIN
RsyncUI.png
Normal file
BIN
RsyncUI.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
35
RsyncUI.pro
35
RsyncUI.pro
@ -1,7 +1,10 @@
|
||||
QT += core gui concurrent
|
||||
QT += KItemViews
|
||||
QT += KCompletion
|
||||
QT += widgets
|
||||
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
|
||||
@ -24,15 +27,35 @@ HEADERS += \
|
||||
tools.h
|
||||
|
||||
FORMS += \
|
||||
configuration.ui \
|
||||
mainwindow.ui
|
||||
|
||||
TRANSLATIONS += \
|
||||
RsyncUI_fr_FR.ts
|
||||
languages/fr_FR/RsyncUI_fr_FR.ts
|
||||
|
||||
INCLUDEPATH += \
|
||||
/usr/include/KF5
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /usr/bin/
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
lang.path = /languages/fr_FR/
|
||||
lang.files = languages/fr_FR/*
|
||||
INSTALLS += lang
|
||||
INSTALLS += documentation
|
||||
INSTALLS += desktopfile
|
||||
INSTALLS += icon
|
||||
|
||||
RESOURCES +=
|
||||
|
||||
DISTFILES += \
|
||||
RsyncUI.desktop
|
||||
|
||||
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
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.14.2, 2023-01-11T01:16:59. -->
|
||||
<!-- Written by QtCreator 4.14.2, 2023-02-02T16:28:47. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
72
RsyncUI.spec
Normal file
72
RsyncUI.spec
Normal file
@ -0,0 +1,72 @@
|
||||
%define oname RsyncUI
|
||||
|
||||
Name: rsyncui
|
||||
Summary: Client for rsync server
|
||||
Version: 1.8.5
|
||||
Release: %mkrel 1
|
||||
License: GPLv3
|
||||
Group: Networking/Remote access
|
||||
Source0: %{oname}-%{version}.tar.gz
|
||||
Packager: dtux@free.fr
|
||||
Distribution: Mageia
|
||||
Url: https://www.librepc.fr
|
||||
Vendor: DTux
|
||||
BuildRequires: qmake
|
||||
BuildRequires: make
|
||||
BuildRequires: pkgconfig(Qt5Core)
|
||||
BuildRequires: pkgconfig(Qt5Gui)
|
||||
BuildRequires: pkgconfig(Qt5Concurrent)
|
||||
BuildRequires: pkgconfig(Qt5Widgets)
|
||||
BuildRequires: pkgconfig(Qt5Xml)
|
||||
BuildRequires: pkgconfig(libmagic)
|
||||
BuildRequires: cmake(KF5Completion)
|
||||
BuildRequires: cmake(KF5CoreAddons)
|
||||
BuildRequires: cmake(KF5I18n)
|
||||
BuildRequires: cmake(KF5DBusAddons)
|
||||
BuildRequires: cmake(KF5Config)
|
||||
BuildRequires: cmake(KF5ItemViews)
|
||||
BuildRequires: pstreams-devel
|
||||
BuildRequires: boost-devel
|
||||
|
||||
#Requires: kitemviews
|
||||
#Requires: kcompletion
|
||||
#Requires: kcoreaddons
|
||||
#Requires: kdbusaddons
|
||||
Requires: rsync
|
||||
Requires: bind-utils
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
%description
|
||||
RsyncUI can connect to an rsync server, get the list of services,
|
||||
and download files.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{oname}
|
||||
|
||||
%build
|
||||
%make_build
|
||||
|
||||
%install
|
||||
#INSTALL_ROOT=%{BUILDROOT} make install
|
||||
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_datadir}/applications/
|
||||
mkdir -p %{buildroot}%{_datadir}/icons/
|
||||
install -p -m 755 %{oname} %{buildroot}%{_bindir}/%{oname}
|
||||
install -p -m 644 %{oname}.desktop %{buildroot}%{_datadir}/applications/
|
||||
install -p -m 644 %{oname}.png %{buildroot}%{_datadir}/icons/
|
||||
|
||||
pushd languages
|
||||
for locale in *;
|
||||
do
|
||||
mkdir -p %{buildroot}%{_datadir}/locale/$locale/LC_MESSAGES
|
||||
install -m 644 $locale/*.qm "%{buildroot}%{_datadir}/locale/$locale/LC_MESSAGES/"
|
||||
done
|
||||
popd
|
||||
%find_lang %{oname} --with-qt
|
||||
|
||||
%files -f %{oname}.lang
|
||||
%{_bindir}/%{oname}
|
||||
%{_datadir}/applications/%{oname}.desktop
|
||||
%{_datadir}/icons/%{oname}.png
|
BIN
RsyncUI_fr_FR.qm
BIN
RsyncUI_fr_FR.qm
Binary file not shown.
@ -1,67 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="fr_FR">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="downloadProgress.ui" line="20"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadProgress.ui" line="32"/>
|
||||
<source>TextLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="21"/>
|
||||
<source>MainWindow</source>
|
||||
<translation>Fenêtre principale</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="80"/>
|
||||
<source>Server</source>
|
||||
<oldsource>Serveur</oldsource>
|
||||
<translation>Serveur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="112"/>
|
||||
<source>Port</source>
|
||||
<translation>Port</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="278"/>
|
||||
<source>%p%</source>
|
||||
<extracomment>Downloading</extracomment>
|
||||
<translation>Téléchargement</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="295"/>
|
||||
<source>debug</source>
|
||||
<translation>debug</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="34"/>
|
||||
<source>Path</source>
|
||||
<translation>Chemin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="34"/>
|
||||
<source>Size</source>
|
||||
<translation>Taille</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="233"/>
|
||||
<source>server does not exists</source>
|
||||
<translation>Le serveur n'existe pas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="326"/>
|
||||
<source>Choose directory to save file</source>
|
||||
<translation>Choisissez le dossier où enregistrer</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
166
configuration.ui
Normal file
166
configuration.ui
Normal file
@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Configuration</class>
|
||||
<widget class="QDialog" name="Configuration">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::WindowModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>163</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::DefaultContextMenu</enum>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Configuration</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>9</x>
|
||||
<y>9</y>
|
||||
<width>381</width>
|
||||
<height>101</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Toolbar view</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label1">
|
||||
<property name="text">
|
||||
<string extracomment="Bandwidth limit">Bandwidth limit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spinBox">
|
||||
<property name="toolTip">
|
||||
<string>Enter the bandwidth limit (0 to 1024)</string>
|
||||
</property>
|
||||
<property name="toolTipDuration">
|
||||
<number>5000</number>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1024</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="UnitCombobox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string extracomment="Unit of bandwidth">Select th unit of bandwidth limit in Bytes, KiloBytes, MegaBytes, GigaBytes or PetaBytes</string>
|
||||
</property>
|
||||
<property name="toolTipDuration">
|
||||
<number>5000</number>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maxCount">
|
||||
<number>1024</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="maxVisibleItems">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="maxCount">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Icon only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Text only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Text beside icon</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Text under icon</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Text follow icon</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>110</y>
|
||||
<width>321</width>
|
||||
<height>34</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>Configuration</receiver>
|
||||
<slot>hide()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>220</x>
|
||||
<y>126</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>199</x>
|
||||
<y>81</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
@ -1,6 +1,6 @@
|
||||
#include "downloadfile.h"
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "downloadfile.h"
|
||||
#include "tools.h"
|
||||
#include <pstreams/pstream.h>
|
||||
#include <sstream>
|
||||
@ -19,52 +19,73 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
// Initialization de la class
|
||||
downloadFile::downloadFile()
|
||||
{
|
||||
}
|
||||
|
||||
//Slot activated when download is cancelled
|
||||
void downloadFile::cancelled(int pid)
|
||||
{
|
||||
if (kill(pid, SIGTERM) == -1)
|
||||
if (pid == 0)
|
||||
{
|
||||
//TODO gestion erreur kill
|
||||
perror("Pid = 0 : I do not kill"); // Error rsync process not launched so it can't be killed
|
||||
}else if (kill(pid, SIGTERM) == -1)
|
||||
{
|
||||
//TODO managing error of kill
|
||||
}
|
||||
}
|
||||
|
||||
// launch a rsync processus downloading a file
|
||||
void downloadFile::download(MainWindow *mw)
|
||||
{
|
||||
string line;
|
||||
string errorRsync;
|
||||
int pos;
|
||||
array<string, 7> argv;
|
||||
array<string,8> argv;
|
||||
stringstream output;
|
||||
vector<string> v;
|
||||
int value;
|
||||
char buffer[4096];
|
||||
Downloading d;
|
||||
|
||||
d = mw->downloading;
|
||||
|
||||
// Populating array with command and parameters for popen2
|
||||
argv[0] = "/usr/bin/rsync";
|
||||
argv[1] = "--bwlimit=" + mw->connexion.bandwidthLimit;
|
||||
argv[2] = "--port=" + to_string(mw->connexion.port);
|
||||
argv[3] = "-P";
|
||||
argv[4] = mw->connexion.server + "::" + mw->downloading.service + "/" + mw->downloading.path;
|
||||
argv[5] = mw->downloading.savePath + "/";
|
||||
|
||||
//unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd "r"), pclose);
|
||||
FILE * fp = popen2(argv, "r", mw->downloading.pid);
|
||||
|
||||
if (!fp)
|
||||
if (mw->connexion.bandwidthLimit == 0)
|
||||
{
|
||||
throw runtime_error("popen2() failed!");
|
||||
argv[1] = "--bwlimit=1000P";
|
||||
}else
|
||||
{
|
||||
argv[1] = "--bwlimit=" + to_string(mw->connexion.bandwidthLimit) + mw->connexion.bandwidthLimitUnit;
|
||||
}
|
||||
argv[2] = "--port=" + to_string(mw->connexion.port);
|
||||
argv[3] = "-aP";
|
||||
argv[4] = d.server + "::" + d.service + "/" + d.path;
|
||||
argv[5] = d.savePath + "/";
|
||||
argv[6].clear();
|
||||
|
||||
//launching downloading thread
|
||||
FILE * fp = popen2(argv, "r", mw->pid);
|
||||
if (fp <= (FILE *) 0)
|
||||
{
|
||||
sprintf(buffer, "popen2() failed!: returning code:%d", fileno(fp));
|
||||
throw runtime_error(buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
// waiting rsync output
|
||||
while (fgets(buffer, 4096, fp) != nullptr)
|
||||
{
|
||||
// Downloading is cancelled, we return
|
||||
if (this->canceled == true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
line = buffer;
|
||||
//cout << line << endl;
|
||||
|
||||
// extracting percentage of completion
|
||||
pos = line.find('%');
|
||||
if (pos != -1)
|
||||
{
|
||||
@ -74,14 +95,15 @@ void downloadFile::download(MainWindow *mw)
|
||||
{
|
||||
line.erase(0, pos);
|
||||
value = stoi(line);
|
||||
cout << value << endl;
|
||||
// sending progress to Main window
|
||||
emit progressSignal(value);
|
||||
}
|
||||
}
|
||||
// download ended
|
||||
}
|
||||
pclose2(fp, mw->downloading.pid);
|
||||
pclose2(fp, mw->pid);
|
||||
|
||||
// ProgressBar to 100% and emit signal finished to main application
|
||||
emit progressSignal(100);
|
||||
emit finishedSignal(true);
|
||||
//cout << path << endl;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,9 @@
|
||||
#define DOWNLOADFILE_H
|
||||
|
||||
#include <QObject>
|
||||
#include "ui_mainwindow.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
class MainWindow;
|
||||
|
||||
|
BIN
languages/fr_FR/RsyncUI_fr_FR.qm
Normal file
BIN
languages/fr_FR/RsyncUI_fr_FR.qm
Normal file
Binary file not shown.
290
languages/fr_FR/RsyncUI_fr_FR.ts
Normal file
290
languages/fr_FR/RsyncUI_fr_FR.ts
Normal file
@ -0,0 +1,290 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="fr_FR">
|
||||
<context>
|
||||
<name>Configuration</name>
|
||||
<message>
|
||||
<location filename="../../configuration.ui" line="20"/>
|
||||
<source>Configuration</source>
|
||||
<translation>Configuration</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../configuration.ui" line="38"/>
|
||||
<source>Toolbar view</source>
|
||||
<translation>Toolbar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../configuration.ui" line="45"/>
|
||||
<source>Bandwidth limit</source>
|
||||
<extracomment>Bandwidth limit</extracomment>
|
||||
<translation>Limite de bande passante</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../configuration.ui" line="52"/>
|
||||
<source>Enter the bandwidth limit (0 to 1024)</source>
|
||||
<translation>Entrez la limite de bande passante (0 à 1024)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../configuration.ui" line="74"/>
|
||||
<source>Select th unit of bandwidth limit in Bytes, KiloBytes, MegaBytes, GigaBytes or PetaBytes</source>
|
||||
<extracomment>Unit of bandwidth</extracomment>
|
||||
<translation>Sélectionnez l'unité de limite de bande passante en otctets, Ko, Mo, Go, Po</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../configuration.ui" line="100"/>
|
||||
<source>Icon only</source>
|
||||
<translation>Icône seule</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../configuration.ui" line="105"/>
|
||||
<source>Text only</source>
|
||||
<translation>Texte seul</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../configuration.ui" line="110"/>
|
||||
<source>Text beside icon</source>
|
||||
<translation>Text à côté de l'icône</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../configuration.ui" line="115"/>
|
||||
<source>Text under icon</source>
|
||||
<translation>Texte sous l'icöne</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../configuration.ui" line="120"/>
|
||||
<source>Text follow icon</source>
|
||||
<translation>Texte suit l'icône</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="21"/>
|
||||
<source>MainWindow</source>
|
||||
<translation>Fenêtre principale</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="83"/>
|
||||
<source>Server</source>
|
||||
<oldsource>Serveur</oldsource>
|
||||
<translation>Serveur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="105"/>
|
||||
<source>Enter server's URL</source>
|
||||
<translation>Entrez l'adresse du serveur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="121"/>
|
||||
<source>Port</source>
|
||||
<translation>Port</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="149"/>
|
||||
<source>Enter rsync port on server</source>
|
||||
<translation>Entrez le port du serveur rsync</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="186"/>
|
||||
<source>Press button to connect to rsync server</source>
|
||||
<extracomment>Connect to server</extracomment>
|
||||
<translation>Cliquez pour se connecter au serveur rsync</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="192"/>
|
||||
<source>Connection</source>
|
||||
<translation>Connexion</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="195"/>
|
||||
<source>Return</source>
|
||||
<translation>Retour</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="221"/>
|
||||
<source>Click to view the list of files of this folder</source>
|
||||
<translation>Cliquez pour afficher la liste des documents</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="256"/>
|
||||
<source>Click to add to download queue</source>
|
||||
<translation>Cliquez pour ajouter à la file de téléchargement</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="334"/>
|
||||
<source>Click on file to stop downloading</source>
|
||||
<translation>Cliquez sur le document pour arrêter le téléchargement et l'enlever de la file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="357"/>
|
||||
<source>%p%</source>
|
||||
<extracomment>Downloading</extracomment>
|
||||
<translation>Téléchargement</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="368"/>
|
||||
<source>toolBar</source>
|
||||
<translation>Barre d'outils</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="440"/>
|
||||
<source>Download</source>
|
||||
<translation>Télécharger</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="443"/>
|
||||
<source>Click on menu button to download the entire folder</source>
|
||||
<translation>Cliquer sur le bouton droit de la souris pour télécharger le dossier entier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="405"/>
|
||||
<location filename="../../mainwindow.ui" line="408"/>
|
||||
<source>Change save folder</source>
|
||||
<translation>Changer le dossier de destination</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="417"/>
|
||||
<source>About</source>
|
||||
<translation>À propos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="426"/>
|
||||
<source>About Qt</source>
|
||||
<translation>À propos de Qt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.ui" line="435"/>
|
||||
<source>Settings</source>
|
||||
<translation>Paramètres</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="28"/>
|
||||
<source>Byte</source>
|
||||
<translation>Octet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="28"/>
|
||||
<source>KB</source>
|
||||
<translation>Ko</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="28"/>
|
||||
<source>MB</source>
|
||||
<translation>Mo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="28"/>
|
||||
<source>GB</source>
|
||||
<translation>Go</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="28"/>
|
||||
<source>TB</source>
|
||||
<translation>To</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="28"/>
|
||||
<location filename="../../mainwindow.cpp" line="698"/>
|
||||
<source>PB</source>
|
||||
<translation>Po</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="31"/>
|
||||
<source>Client for rsync server
|
||||
|
||||
You click on file to enqueue it, and RyncUI Download one file a time</source>
|
||||
<translation>Client pour serveur rsync
|
||||
|
||||
Cliquez sur un fichier pour l'ajouter dans la file de téléchargement</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="42"/>
|
||||
<source>Path</source>
|
||||
<translation>Chemin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="42"/>
|
||||
<source>Size</source>
|
||||
<translation>Taille</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="42"/>
|
||||
<source>Type</source>
|
||||
<translation>Type</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="361"/>
|
||||
<source>server does not exists</source>
|
||||
<translation>Le serveur n'existe pas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="388"/>
|
||||
<location filename="../../mainwindow.cpp" line="408"/>
|
||||
<source>Dir</source>
|
||||
<translation>Dir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="391"/>
|
||||
<location filename="../../mainwindow.cpp" line="456"/>
|
||||
<source>File</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="634"/>
|
||||
<source>Version</source>
|
||||
<translation>Version</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="635"/>
|
||||
<source>Licence</source>
|
||||
<translation>License</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="636"/>
|
||||
<source>Author</source>
|
||||
<translation>Auteur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="637"/>
|
||||
<source>EMail</source>
|
||||
<translation>Courriel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="638"/>
|
||||
<source>Source code</source>
|
||||
<translation>Code source</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="663"/>
|
||||
<source>Choose directory to save file</source>
|
||||
<translation>Choisissez le dossier où enregistrer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="563"/>
|
||||
<source>Do you want to stop downloading and delete this file from download queue ?</source>
|
||||
<translation>Voulez-vous arrêter le téléchargement et enlever ce fichier de la file de téléchargement ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="66"/>
|
||||
<source>A list of interrupted downloads exists, do you want to continue downloading ? or you can delete the list</source>
|
||||
<translation>Voulez-vous reprendre les téléchargements interrompus la fois précédente? ou vous pouvez supprimer la liste</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="68"/>
|
||||
<source>Remove</source>
|
||||
<translation>Supprimer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="107"/>
|
||||
<source>Exiting will stop downloading, and will clear the download queue.
|
||||
You can save the list of downloads
|
||||
Do you want to exit ?</source>
|
||||
<translation>Si vous sortez, les téléchargements seront arrêter, mais vous pouvez enregistrer la liste pour la prochaine fois</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwindow.cpp" line="575"/>
|
||||
<source>Do you want to delete this file from download queue ?</source>
|
||||
<translation>Voulez-vous enlever ce fichier de la file de téléchargement ?</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
16
main.cpp
16
main.cpp
@ -1,10 +1,22 @@
|
||||
#include "mainwindow.h"
|
||||
#include <QApplication>
|
||||
#include <QSettings>
|
||||
|
||||
#include <QTranslator>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
QTranslator myappTranslator;
|
||||
|
||||
QCoreApplication::setOrganizationName("RsyncUI");
|
||||
QCoreApplication::setApplicationName("RsyncUI");
|
||||
// Initialization of localization
|
||||
QLocale localeName = QLocale::system();
|
||||
QString localeFile = "/usr/share/locale/" + localeName.name() + "/LC_MESSAGES/RsyncUI_" + localeName.name() + ".qm";
|
||||
if (myappTranslator.load(localeFile))
|
||||
{
|
||||
a.installTranslator(&myappTranslator);
|
||||
}
|
||||
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
|
607
mainwindow.cpp
607
mainwindow.cpp
@ -1,116 +1,210 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "downloadfile.h"
|
||||
#include "tools.h"
|
||||
#include <iostream>
|
||||
#include <KTreeWidgetSearchLineWidget>
|
||||
#include <pstreams/pstream.h>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <QMessageBox>
|
||||
#include <vector>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <QFuture>
|
||||
#include <QtConcurrent>
|
||||
#include <qtconcurrentrun.h>
|
||||
#include <QFileDialog>
|
||||
#include <QThread>
|
||||
#include <QProgressDialog>
|
||||
#include <QCheckBox>
|
||||
#include <sys/wait.h>
|
||||
#include <QGuiApplication>
|
||||
#include <QComboBox>
|
||||
#include <QToolBar>
|
||||
|
||||
using namespace std;
|
||||
|
||||
bool display = false;
|
||||
//extern QDialog Configuration;
|
||||
extern Ui::Configuration config;
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
{
|
||||
QAbstractButton * reply;
|
||||
QMessageBox msgBox;
|
||||
ui->setupUi(this);
|
||||
|
||||
QCoreApplication::setOrganizationName("RsyncUI");
|
||||
QCoreApplication::setApplicationName("RsyncUI");
|
||||
|
||||
// context menu for treewidget
|
||||
ui->treeWidget->addAction(ui->actionDownload);
|
||||
|
||||
// init shortcut
|
||||
loadSettings();
|
||||
config.setupUi(&Configuration);
|
||||
config.UnitCombobox->addItems({tr("Byte"), tr("KB"), tr("MB"), tr("GB"), tr("TB"), tr("PB")});
|
||||
|
||||
// init of About
|
||||
this->about.description = tr("Client for rsync server\n\nYou click on file to enqueue it, and RyncUI Download one file a time");
|
||||
|
||||
// connectors
|
||||
connect(&downloadO, &downloadFile::progressSignal, ui->progressBar, &QProgressBar::setValue);
|
||||
connect(&downloadO, &downloadFile::finishedSignal, this, &MainWindow::downloadFinished);
|
||||
connect(this, &MainWindow::stopDownloading, &downloadO, &downloadFile::cancelled);
|
||||
connect(config.buttonBox, SIGNAL(accepted()), this, SLOT(on_buttonBox_accepted()));
|
||||
|
||||
// init of widgets
|
||||
ui->ktreewidgetsearchline->setTreeWidget(ui->treeWidget);
|
||||
ui->ktreewidgetsearchline->setCaseSensitivity(Qt::CaseInsensitive);
|
||||
ui->treeWidget->setHeaderLabels({tr("Path"), tr("Size")} );
|
||||
ui->treeWidget->setHeaderLabels({tr("Path"), tr("Type"), tr("Size")} );
|
||||
config.comboBox->setCurrentIndex(ui->toolBar->toolButtonStyle());
|
||||
if (this->settings.contains("connexion/lastServer"))
|
||||
{
|
||||
ui->portEdit->setText(this->settings.value("connexion/port").toString());
|
||||
ui->khistorycombobox->setCurrentText(this->settings.value("connexion/lastServer").toString());
|
||||
}else
|
||||
{
|
||||
ui->portEdit->text() = QString::number(this->connexion.port);
|
||||
ui->khistorycombobox->clear();
|
||||
}
|
||||
|
||||
// setting arrowcursor for treeWidget, listWidget and listDownload
|
||||
ui->treeWidget->setCursor(Qt::ArrowCursor);
|
||||
ui->listWidget->setCursor(Qt::ArrowCursor);
|
||||
ui->listDownload->setCursor(Qt::ArrowCursor);
|
||||
|
||||
// Hiding progress bar
|
||||
ui->progressBar->hide();
|
||||
loadSettings();
|
||||
|
||||
if (this->settings.value("Downloads/rows").toInt() != 0)
|
||||
{
|
||||
this->settings.endArray();
|
||||
msgBox.setWindowTitle("RsyncUI");
|
||||
msgBox.setInformativeText(tr("A list of interrupted downloads exists, do you want to continue downloading ? or you can delete the list" ));
|
||||
|
||||
QPushButton *remove = msgBox.addButton(tr("Remove"), QMessageBox::ActionRole);
|
||||
QPushButton *yes = msgBox.addButton(QMessageBox::Yes);
|
||||
|
||||
msgBox.addButton(QMessageBox::No);
|
||||
msgBox.setDefaultButton(QMessageBox::No);
|
||||
|
||||
msgBox.exec();
|
||||
reply = msgBox.clickedButton();
|
||||
if(reply == yes)
|
||||
{
|
||||
loadDownloadList();
|
||||
}else if (reply == remove)
|
||||
{
|
||||
this->settings.remove("Downloads");
|
||||
}
|
||||
}
|
||||
|
||||
populateList();
|
||||
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
QMessageBox::StandardButton reply;
|
||||
|
||||
|
||||
if (ui->listDownload->count() != 0)
|
||||
{
|
||||
reply = QMessageBox::question(
|
||||
this,
|
||||
"RsyncUI",
|
||||
tr("Exiting will stop downloading, and will clear the download queue.\n Do you want to exit ?"),
|
||||
QMessageBox::Yes|QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
if (reply == QMessageBox::Yes)
|
||||
{
|
||||
emit (stopDownloading(this->downloading.pid));
|
||||
}
|
||||
}
|
||||
if (this->downloading.pid != 0)
|
||||
{
|
||||
waitpid(this->downloading.pid, NULL, WUNTRACED);
|
||||
}
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MainWindow::populateTree()
|
||||
// Closing window has been clicked
|
||||
void MainWindow::closeEvent (QCloseEvent *event)
|
||||
{
|
||||
QMessageBox::StandardButton reply;
|
||||
|
||||
// saving settings
|
||||
saveSettings();
|
||||
|
||||
if (ui->listDownload->count() != 0) // some downloads waiting
|
||||
{
|
||||
// Asking for stopping or continuing
|
||||
reply = QMessageBox::question(
|
||||
this,
|
||||
"RsyncUI",
|
||||
tr("Exiting will stop downloading, and will clear the download queue.\nYou can save the list of downloads\nDo you want to exit ?"),
|
||||
QMessageBox::Yes|QMessageBox::Save|QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
if (reply == QMessageBox::No)
|
||||
{
|
||||
// continuing
|
||||
event->ignore();
|
||||
return;
|
||||
}else if(reply == QMessageBox::Yes)
|
||||
{
|
||||
// emission of signal to downloading thread and stopping
|
||||
emit (stopDownloading(this->pid));
|
||||
waitpid(this->pid, NULL, WUNTRACED);
|
||||
}else
|
||||
{
|
||||
saveDownloadList();
|
||||
}
|
||||
}
|
||||
event->accept();
|
||||
}
|
||||
|
||||
// Populate treeview with list of files
|
||||
void MainWindow::populateTree(QTreeWidgetItem * parent)
|
||||
{
|
||||
stringstream ss;
|
||||
vector<string> path;
|
||||
|
||||
// Clear treewidget
|
||||
ui->treeWidget->clear();
|
||||
if (!this->connexion.server.empty() and this->connexion.port > 0 and this->connexion.port < 65536)
|
||||
{
|
||||
// setting cursor to "Wait"
|
||||
QGuiApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
|
||||
if (validateServer(this->connexion.server))
|
||||
{
|
||||
QGuiApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
// server is validated
|
||||
path = explode(ui->listWidget->currentItem()->text().toStdString(), '\n', 2);
|
||||
scanDir(this->connexion.server, this->connexion.port, NULL, path[0].append("/") );
|
||||
this->unsetCursor();
|
||||
QGuiApplication::setOverrideCursor(Qt::ArrowCursor);
|
||||
scanDir(this->connexion.server, this->connexion.port, parent, path[0].append("/") );
|
||||
}
|
||||
// Restoring cursor
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
}
|
||||
}
|
||||
|
||||
// Populate Listview with list of services
|
||||
void MainWindow::populateList()
|
||||
{
|
||||
stringstream ss;
|
||||
QString str;
|
||||
QString server;
|
||||
int port;
|
||||
|
||||
this->connexion.server.assign(ui->khistorycombobox->currentText().toStdString());
|
||||
ss << ui->portEdit->text().toStdString();
|
||||
ss >> this->connexion.port;
|
||||
if (!this->connexion.server.empty() and this->connexion.port > 0 and this->connexion.port < 65536)
|
||||
server = ui->khistorycombobox->currentText();
|
||||
port = ui->portEdit->text().toUInt();
|
||||
if ((server.toStdString() != this->connexion.server) or (port != this->connexion.port))
|
||||
{
|
||||
if (validateServer(this->connexion.server))
|
||||
// clearing listwidget
|
||||
ui->listWidget->clear();
|
||||
this->connexion.server.assign(server.toStdString());
|
||||
this->connexion.port = port;
|
||||
|
||||
QGuiApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
|
||||
// verify if server is in history
|
||||
this->settings.beginGroup("connexion/server");
|
||||
if (this->settings.contains(server))
|
||||
{
|
||||
ui->khistorycombobox->addItem(this->connexion.server.c_str());
|
||||
ui->centralwidget->cursor().setShape(Qt::WaitCursor);
|
||||
// server is in history => setting port value
|
||||
port = this->settings.value(server).toUInt();
|
||||
ui->portEdit->setText(QString::number(port));
|
||||
this->connexion.port = port;
|
||||
listServices();
|
||||
ui->centralwidget->cursor().setShape(Qt::ArrowCursor);
|
||||
QStringList test = ui->khistorycombobox->historyItems();
|
||||
sleep(1);
|
||||
}else
|
||||
{
|
||||
if (!server.isEmpty() and (port > 0 and port < 65536))
|
||||
{
|
||||
if (validateServer(server.toStdString()))
|
||||
{
|
||||
cout << server.toStdString() << endl;
|
||||
// storing serverURL and port in settings
|
||||
this->settings.setValue(server, port);
|
||||
this->settings.sync();
|
||||
this->downloading.server = server.toStdString();
|
||||
|
||||
// storing in history of combobox
|
||||
ui->khistorycombobox->addToHistory(server);
|
||||
|
||||
// "waiting" cursor
|
||||
// load and display rsync services of the rsync server
|
||||
listServices();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
this->settings.endGroup();
|
||||
QGuiApplication::restoreOverrideCursor(); //setOverrideCursor(Qt::ArrowCursor);
|
||||
}
|
||||
}
|
||||
|
||||
//list services of the rsync server
|
||||
void MainWindow::listServices()
|
||||
{
|
||||
char cmd[4096];
|
||||
@ -123,7 +217,6 @@ void MainWindow::listServices()
|
||||
redi::ipstream in(cmd, redi::pstreams::pstdout | redi::pstreams::pstderr);
|
||||
while (getline(in.out(), line))
|
||||
{
|
||||
cout << "stdout: " << line << endl;
|
||||
boost::replace_all(line," ","");
|
||||
boost::replace_all(line, "\t", " - ");
|
||||
v = explode(line, ' ', 3 );
|
||||
@ -132,6 +225,7 @@ void MainWindow::listServices()
|
||||
}
|
||||
}
|
||||
|
||||
// connect to rsync server to get list of files
|
||||
void MainWindow::scanDir(string server, int portN, QTreeWidgetItem *parent, string path)
|
||||
{
|
||||
char cmd[4096];
|
||||
@ -139,37 +233,41 @@ void MainWindow::scanDir(string server, int portN, QTreeWidgetItem *parent, stri
|
||||
string errorRsync;
|
||||
vector<string> v;
|
||||
QTreeWidgetItem * item;
|
||||
char npath[4096];
|
||||
bool isDir = false;
|
||||
|
||||
sprintf(cmd, "rsync --contimeout=10 -P \"%s::%s\" --port %d ", server.c_str(), path.c_str(), portN );
|
||||
redi::ipstream in(cmd, redi::pstreams::pstdout | redi::pstreams::pstderr);
|
||||
|
||||
while (getline(in.out(), line))
|
||||
{
|
||||
|
||||
v = explode(line, ' ', 5);
|
||||
if (v.size() == 5)
|
||||
{
|
||||
if (v[4].at(0) != '.' and (v[0].at(0) == '-' or v[0].at(0) == 'd'))
|
||||
{
|
||||
if (parent != NULL)
|
||||
{
|
||||
item = addTreeChild(parent,QString::fromStdString(v[4]), QString::fromStdString(v[1]));
|
||||
}else
|
||||
{
|
||||
item = addTreeRoot(QString::fromStdString(v[4]), QString::fromStdString(v[1]));
|
||||
}
|
||||
if (v[0].at(0) == 'd')
|
||||
{
|
||||
sprintf(npath, "%s%s/", path.c_str(), v[4].c_str());
|
||||
scanDir(server, portN, item, npath);
|
||||
isDir = true;
|
||||
}else
|
||||
{
|
||||
isDir = false;
|
||||
}
|
||||
if (parent != NULL)
|
||||
{
|
||||
item = addTreeChild(parent,QString::fromStdString(v[4]), QString::fromStdString(v[1]), isDir);
|
||||
}else
|
||||
{
|
||||
item = addTreeRoot(QString::fromStdString(v[4]), QString::fromStdString(v[1]), isDir);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if reading stdout stopped at EOF then reset the state:
|
||||
if (in.eof() && in.fail())
|
||||
in.clear();
|
||||
|
||||
// read child's stderr
|
||||
while (getline(in.err(), line))
|
||||
{
|
||||
@ -177,6 +275,7 @@ void MainWindow::scanDir(string server, int portN, QTreeWidgetItem *parent, stri
|
||||
errorRsync.append(line);
|
||||
errorRsync.append("\n");
|
||||
}
|
||||
|
||||
if ( !errorRsync.empty())
|
||||
{
|
||||
QMessageBox::warning(
|
||||
@ -187,6 +286,7 @@ void MainWindow::scanDir(string server, int portN, QTreeWidgetItem *parent, stri
|
||||
|
||||
}
|
||||
|
||||
// Verify if server address is IP address
|
||||
bool MainWindow::isIpAddress(string server)
|
||||
{
|
||||
vector<string> r;
|
||||
@ -205,10 +305,14 @@ bool MainWindow::isIpAddress(string server)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// validate address server
|
||||
bool MainWindow::validateServer(string server)
|
||||
{
|
||||
char cmd[512];
|
||||
@ -221,7 +325,7 @@ bool MainWindow::validateServer(string server)
|
||||
|
||||
while (getline(in.out(), line))
|
||||
{
|
||||
cout << "stdout: " << line << '\n';
|
||||
//cout << "stdout: " << line << '\n';
|
||||
if (line.find(";; ANSWER SECTION:") != string::npos)
|
||||
{
|
||||
flag = true;
|
||||
@ -260,102 +364,136 @@ bool MainWindow::validateServer(string server)
|
||||
return flag;
|
||||
}
|
||||
|
||||
void MainWindow::displayTree()
|
||||
// slot activated when combobox is changed
|
||||
void MainWindow::on_khistorycombobox_currentIndexChanged(int i)
|
||||
{
|
||||
populateTree();
|
||||
|
||||
on_connectButton_clicked();
|
||||
}
|
||||
|
||||
void MainWindow::on_khistorycombobox_returnPressed()
|
||||
// slot activated when button connection is clicked
|
||||
void MainWindow::on_connectButton_clicked()
|
||||
{
|
||||
populateList();
|
||||
populateList();
|
||||
}
|
||||
|
||||
void MainWindow::on_portEdit_returnPressed()
|
||||
{
|
||||
populateList();
|
||||
}
|
||||
|
||||
void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, int column)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::on_treeWidget_customContextMenuRequested()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::on_actionDownload_triggered()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QTreeWidgetItem * MainWindow::addTreeRoot(QString name, QString fileSize)
|
||||
// add a dir in treeview
|
||||
QTreeWidgetItem * MainWindow::addTreeRoot(QString name, QString fileSize, bool isDir)
|
||||
{
|
||||
// QTreeWidgetItem(QTreeWidget * parent, int type = Type)
|
||||
QTreeWidgetItem *treeItem = new QTreeWidgetItem(ui->treeWidget);
|
||||
|
||||
// QTreeWidgetItem::setText(int column, const QString & text)
|
||||
if (isDir == true)
|
||||
{
|
||||
treeItem->setText(1, tr("Dir"));
|
||||
}else
|
||||
{
|
||||
treeItem->setText(1,tr("File"));
|
||||
}
|
||||
treeItem->setText(0, name);
|
||||
treeItem->setText(1, fileSize);
|
||||
treeItem->setText(2, fileSize);
|
||||
|
||||
return treeItem;
|
||||
}
|
||||
|
||||
QTreeWidgetItem * MainWindow::addTreeChild(QTreeWidgetItem *parent, QString name, QString fileSize)
|
||||
// add a file in treeview
|
||||
QTreeWidgetItem * MainWindow::addTreeChild(QTreeWidgetItem *parent, QString name, QString fileSize, bool isDir)
|
||||
{
|
||||
// QTreeWidgetItem(QTreeWidget * parent, int type = Type)
|
||||
QTreeWidgetItem *treeItem = new QTreeWidgetItem();
|
||||
|
||||
// QTreeWidgetItem::setText(int column, const QString & text)
|
||||
if (isDir == true)
|
||||
{
|
||||
treeItem->setText(1, tr("Dir"));
|
||||
}else
|
||||
{
|
||||
treeItem->setText(1,("File"));
|
||||
}
|
||||
treeItem->setText(0, name);
|
||||
treeItem->setText(1, fileSize);
|
||||
treeItem->setText(2, fileSize);
|
||||
|
||||
// QTreeWidgetItem::addChild(QTreeWidgetItem * child)
|
||||
parent->addChild(treeItem);
|
||||
return treeItem;
|
||||
}
|
||||
|
||||
void MainWindow::on_listWidget_clicked(const QModelIndex &index)
|
||||
// Slot acivated when a service in the list is clicked
|
||||
void MainWindow::on_listWidget_clicked()
|
||||
{
|
||||
vector<string> v;
|
||||
QString str;
|
||||
|
||||
v = explode(ui->listWidget->currentItem()->text().toStdString(), '\n', 2);
|
||||
this->downloading.service = v[0];
|
||||
populateTree();
|
||||
this->connexion.service = v[0];
|
||||
str = QString::fromStdString("Folder/" + this->connexion.server + "/" + this->connexion.service);
|
||||
if (this->settings.contains(str))
|
||||
{
|
||||
this->downloading.savePath = this->settings.value(str).toString().toStdString();
|
||||
}
|
||||
populateTree(NULL);
|
||||
}
|
||||
|
||||
void MainWindow::on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column)
|
||||
//Slot activated when a file is clicked in the treeview
|
||||
void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadDir)
|
||||
{
|
||||
QFuture<void> future;
|
||||
QFileDialog dialog;
|
||||
QCheckBox *cb = new QCheckBox("Okay I understand");
|
||||
QTreeWidgetItem * itemR;
|
||||
string path;
|
||||
QString str;
|
||||
|
||||
item = ui->treeWidget->currentItem();
|
||||
this->downloading.path = item->text(0).toStdString();
|
||||
while(item->parent() != NULL)
|
||||
//item = ui->treeWidget->currentItem();
|
||||
itemR = item;
|
||||
|
||||
path = item->text(0).toStdString();
|
||||
while(itemR->parent() != NULL)
|
||||
{
|
||||
item = item->parent();
|
||||
this->downloading.path = item->text(0).toStdString() + "/" + this->downloading.path;
|
||||
|
||||
itemR = itemR->parent();
|
||||
path = itemR->text(0).toStdString() + "/" + path;
|
||||
};
|
||||
|
||||
//dirPath.append("/Vidéos/");
|
||||
if (this->downloading.savePath.empty())
|
||||
if (item->text(1) == tr("File") or downloadDir == true)
|
||||
{
|
||||
if (this->downloading.dirPath.toStdString().empty())
|
||||
// Item is a file
|
||||
this->downloading.path = path;
|
||||
this->downloading.server = this->connexion.server;
|
||||
this->downloading.service = this->connexion.service;
|
||||
|
||||
// exists saving path in settings ?
|
||||
str = QString::fromStdString("Folder/" + this->connexion.server + "/" + this->downloading.service);
|
||||
if(!this->settings.contains(str))
|
||||
{
|
||||
this->downloading.dirPath = getenv("HOME");
|
||||
// saving path do not exists, asking for it
|
||||
if(!on_DefaultSaveFolder_triggered())
|
||||
{
|
||||
cout << "no directory selectioned, ignoring download request";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this->downloading.savePath = dialog.getExistingDirectory(this, tr("Choose directory to save file"), this->downloading.dirPath, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks).toStdString();
|
||||
if (!this->downloading.savePath.empty() && this->downloading.pid == 0)
|
||||
// is there a downloading process ?
|
||||
if (this->pid == 0)
|
||||
{
|
||||
// no downloading process launching it
|
||||
startDownloading();
|
||||
// wit 1 second to process start
|
||||
//sleep(1);
|
||||
}
|
||||
|
||||
// Adding download in download list
|
||||
str = QString::fromStdString(this->downloading.path + " => " + this->connexion.server + "/" + this->downloading.service);
|
||||
ui->listDownload->addItem(str);
|
||||
}else
|
||||
{
|
||||
//Item is a Directory
|
||||
scanDir(this->connexion.server, this->connexion.port, item, this->connexion.service + "/" + path +"/");
|
||||
item->setExpanded(true);
|
||||
}
|
||||
ui->listDownload->addItem(QString::fromStdString(this->downloading.path));
|
||||
|
||||
}
|
||||
|
||||
// Launch the thread which download the file
|
||||
void MainWindow::startDownloading()
|
||||
{
|
||||
ui->progressBar->setValue(0);
|
||||
@ -365,29 +503,58 @@ void MainWindow::startDownloading()
|
||||
|
||||
}
|
||||
|
||||
// Slot stopping download
|
||||
void MainWindow::stoppingDownload()
|
||||
{
|
||||
emit (stopDownloading(this->downloading.pid));
|
||||
emit (stopDownloading(this->pid));
|
||||
}
|
||||
|
||||
// when download is finished, launch download of next file in queue
|
||||
void MainWindow::downloadFinished()
|
||||
{
|
||||
string path;
|
||||
int pos;
|
||||
string str;
|
||||
|
||||
this->pid = 0;
|
||||
ui->progressBar->hide();
|
||||
delete ui->listDownload->takeItem(0);
|
||||
this->downloading.pid = 0;
|
||||
this->downloading.clear();
|
||||
if (ui->listDownload->count() != 0)
|
||||
{
|
||||
this->downloading.path = ui->listDownload->item(0)->text().toStdString();
|
||||
path = ui->listDownload->item(0)->text().toStdString();
|
||||
pos = path.rfind("/");
|
||||
this->downloading.service = path.substr(pos+1);
|
||||
path.resize(pos);
|
||||
pos = path.rfind(" => ");
|
||||
this->downloading.server = path.substr(pos+4);
|
||||
path.resize(pos);
|
||||
this->downloading.path = path;
|
||||
str = "Folder/" + this->downloading.server + "/" + this->downloading.service;
|
||||
if (this->settings.contains(QString::fromStdString(str)))
|
||||
{
|
||||
this->downloading.savePath = this->settings.value(QString::fromStdString(str)).toString().toStdString();
|
||||
}else
|
||||
{
|
||||
if(!on_DefaultSaveFolder_triggered())
|
||||
{
|
||||
cout << "Error no save path so deleting download";
|
||||
downloadFinished();
|
||||
return;
|
||||
}
|
||||
}
|
||||
startDownloading();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Slot activated when a line is clicked in queue list
|
||||
void MainWindow::on_listDownload_itemClicked(QListWidgetItem *item)
|
||||
{
|
||||
QFileDialog dialog;
|
||||
QMessageBox::StandardButton reply;
|
||||
|
||||
cout << item->text().toStdString() << endl;
|
||||
//cout << item->text().toStdString() << endl;
|
||||
if (item->listWidget()->row(item) == 0)
|
||||
{
|
||||
reply = QMessageBox::question(
|
||||
@ -398,7 +565,7 @@ void MainWindow::on_listDownload_itemClicked(QListWidgetItem *item)
|
||||
QMessageBox::No);
|
||||
if (reply == QMessageBox::Yes)
|
||||
{
|
||||
emit (stopDownloading(this->downloading.pid));
|
||||
emit (stopDownloading(this->pid));
|
||||
}
|
||||
}else
|
||||
{
|
||||
@ -416,12 +583,192 @@ void MainWindow::on_listDownload_itemClicked(QListWidgetItem *item)
|
||||
}
|
||||
}
|
||||
|
||||
// load settings
|
||||
void MainWindow::loadSettings()
|
||||
{
|
||||
this->settings.value("serverlist");
|
||||
// restoring geometry and state of window and widgets
|
||||
this->restoreGeometry(this->settings.value("window/geometry").toByteArray());
|
||||
this->restoreState(this->settings.value("window/state").toByteArray());
|
||||
ui->treeWidget->header()->restoreState(this->settings.value("treeWidget/state").toByteArray());
|
||||
ui->splitter->restoreState(this->settings.value("splitter/state").toByteArray());
|
||||
ui->splitter_2->restoreState(this->settings.value("splitter2/state").toByteArray());
|
||||
ui->toolBar->setToolButtonStyle((Qt::ToolButtonStyle)this->settings.value("toolbar/state").toInt());
|
||||
|
||||
// loading connexion settings
|
||||
// loading servers history
|
||||
this->settings.beginGroup("connexion/server");
|
||||
QStringList servers = this->settings.allKeys();
|
||||
this->settings.endGroup();
|
||||
for( const QString &server : servers )
|
||||
{
|
||||
ui->khistorycombobox->addToHistory(server);
|
||||
}
|
||||
|
||||
// loading save path
|
||||
this->downloading.savePath = this->settings.value("Folder").toString().toStdString();
|
||||
|
||||
// loading bandwidth limit
|
||||
this->connexion.bandwidthLimit = this->settings.value("bandwidthlimit").toUInt();
|
||||
this->connexion.bandwidthLimitUnit = this->settings.value("bandwidthlimitunit").toString().toStdString();
|
||||
}
|
||||
|
||||
// save settings
|
||||
void MainWindow::saveSettings()
|
||||
{
|
||||
//ui->khistorycombobox->
|
||||
this->settings.setValue("window/geometry", saveGeometry());
|
||||
this->settings.setValue("window/state", saveState());
|
||||
this->settings.setValue("treeWidget/state", ui->treeWidget->header()->saveState());
|
||||
this->settings.setValue("splitter/state", ui->splitter->saveState());
|
||||
this->settings.setValue("splitter2/state", ui->splitter_2->saveState());
|
||||
this->settings.setValue("connexion/lastServer", QString::fromStdString(this->connexion.server));
|
||||
this->settings.setValue("connexion/lastPort", QString::number(this->connexion.port));
|
||||
this->settings.setValue("toolbar/state", ui->toolBar->toolButtonStyle());
|
||||
this->settings.sync();
|
||||
}
|
||||
|
||||
// About
|
||||
void MainWindow::on_actionAbout_triggered()
|
||||
{
|
||||
//TODO => initialisation
|
||||
QString text = this->about.description + "\n\n" +
|
||||
tr("Version") + ": " + this->about.version + "\n" +
|
||||
tr("Licence") + ": " + this->about.licence + "\n" +
|
||||
tr("Author") + ": " + this->about.author + "\n" +
|
||||
tr("EMail") + ": " + this->about.email + "\n" +
|
||||
tr("Source code") + ": " + this->about.git;
|
||||
QMessageBox::about(this, this->about.title, text);
|
||||
}
|
||||
|
||||
// About QT
|
||||
void MainWindow::on_actionAbout_Qt_triggered()
|
||||
{
|
||||
QMessageBox::aboutQt(this);
|
||||
}
|
||||
|
||||
// Activated when menu "change folder" is clicked
|
||||
bool MainWindow::on_DefaultSaveFolder_triggered()
|
||||
{
|
||||
QFileDialog dialog;
|
||||
string folder;
|
||||
string path;
|
||||
|
||||
if (this->connexion.service.empty())
|
||||
{
|
||||
QMessageBox::warning(
|
||||
NULL,
|
||||
"RsyncUI",
|
||||
"Since the save path is linked to service, you need to select a service before you can select a folder");
|
||||
return false;
|
||||
}
|
||||
path = dialog.getExistingDirectory(this, tr("Choose directory to save file"), QString::fromStdString(getpwuid(getuid())->pw_dir), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks).toStdString();
|
||||
if (!path.empty())
|
||||
{
|
||||
this->downloading.savePath = path;
|
||||
if (!this->connexion.service.empty() and !this->connexion.server.empty())
|
||||
{
|
||||
folder = "Folder/" + this->connexion.server + "/" + this->connexion.service;
|
||||
this->settings.setValue(folder.c_str(), this->downloading.savePath.c_str());
|
||||
this->settings.sync();
|
||||
}
|
||||
}else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Activated when menu "settings" is clicked
|
||||
void MainWindow::on_action_Settings_triggered()
|
||||
{
|
||||
config.UnitCombobox->setCurrentIndex(bwUnixIndex[this->connexion.bandwidthLimitUnit[0]]);
|
||||
config.spinBox->setValue(this->connexion.bandwidthLimit);
|
||||
Configuration.show();
|
||||
}
|
||||
|
||||
// Acivated when "Ok" is clicked in Configuration window
|
||||
void MainWindow::on_buttonBox_accepted()
|
||||
{
|
||||
QString unit;
|
||||
QString bw;
|
||||
|
||||
bw = config.spinBox->text();
|
||||
if (bw.toInt() == 0)
|
||||
{
|
||||
this->connexion.bandwidthLimit = 1000;
|
||||
this->connexion.bandwidthLimitUnit = tr("PB").toStdString();
|
||||
}else
|
||||
{
|
||||
this->connexion.bandwidthLimit = config.spinBox->value();
|
||||
this->connexion.bandwidthLimitUnit = config.UnitCombobox->currentText().toStdString()[0];
|
||||
}
|
||||
this->settings.setValue("bandwidthlimit", this->connexion.bandwidthLimit);
|
||||
this->settings.setValue("bandwidthlimitunit", this->connexion.bandwidthLimitUnit.c_str());
|
||||
this->settings.sync();
|
||||
Configuration.hide();
|
||||
}
|
||||
|
||||
// Saving download list
|
||||
void MainWindow::saveDownloadList()
|
||||
{
|
||||
int nRows;
|
||||
|
||||
nRows = ui->listDownload->count();
|
||||
//this->settings.beginWriteArray("Downloads/");
|
||||
this->settings.beginGroup("Downloads");
|
||||
this->settings.setValue("rows", nRows);
|
||||
for (int i = 0; i < nRows; i++)
|
||||
{
|
||||
this->settings.setValue(QString::number(i), ui->listDownload->item(i)->text());
|
||||
}
|
||||
this->settings.endGroup();
|
||||
this->settings.sync();
|
||||
}
|
||||
|
||||
void MainWindow::loadDownloadList()
|
||||
{
|
||||
string path;
|
||||
string str;
|
||||
int pos;
|
||||
|
||||
this->settings.beginGroup("Downloads");
|
||||
int size = this->settings.value("rows").toInt();
|
||||
for (int i = 0; i < size; ++i)
|
||||
{
|
||||
ui->listDownload->addItem(this->settings.value(QString::number(i)).toString());
|
||||
}
|
||||
this->settings.endGroup();
|
||||
|
||||
this->settings.remove("Downloads");
|
||||
this->settings.sync();
|
||||
|
||||
path = ui->listDownload->item(0)->text().toStdString();
|
||||
pos = path.rfind("/");
|
||||
this->downloading.service = path.substr(pos+1);
|
||||
path.resize(pos);
|
||||
pos = path.rfind(" => ");
|
||||
this->downloading.server = path.substr(pos+4);
|
||||
path.resize(pos);
|
||||
this->downloading.path = path;
|
||||
str = "Folder/" + this->downloading.server + "/" + this->downloading.service;
|
||||
if (this->settings.contains(QString::fromStdString(str)))
|
||||
{
|
||||
this->downloading.savePath = this->settings.value(QString::fromStdString(str)).toString().toStdString();
|
||||
}
|
||||
startDownloading();
|
||||
}
|
||||
|
||||
void Downloading::clear()
|
||||
{
|
||||
this->path.clear();
|
||||
this->server.clear();
|
||||
this->savePath.clear();
|
||||
this->service.clear();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionDownload_triggered()
|
||||
{
|
||||
// action made in qt-designer and added in init function.
|
||||
QTreeWidgetItem *item;
|
||||
item = ui->treeWidget->currentItem();
|
||||
on_treeWidget_itemClicked(item, true);
|
||||
}
|
||||
|
133
mainwindow.h
133
mainwindow.h
@ -1,13 +1,41 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#define QT_USE_FAST_CONCATENATION
|
||||
#define QT_USE_FAST_OPERATOR_PLUS
|
||||
#include "ui_mainwindow.h"
|
||||
#include "ui_configuration.h"
|
||||
#include "downloadfile.h"
|
||||
#include "tools.h"
|
||||
#include <QMainWindow>
|
||||
#include <string>
|
||||
#include <QTreeWidgetItem>
|
||||
#include <QListWidgetItem>
|
||||
#include "downloadfile.h"
|
||||
#include <QProgressDialog>
|
||||
#include <QSettings>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <KTreeWidgetSearchLineWidget>
|
||||
#include <pstreams/pstream.h>
|
||||
#include <sstream>
|
||||
#include <cstring>
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <QMessageBox>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <QFuture>
|
||||
#include <qtconcurrentrun.h>
|
||||
#include <QFileDialog>
|
||||
#include <QThread>
|
||||
#include <QProgressDialog>
|
||||
#include <sys/wait.h>
|
||||
#include <QGuiApplication>
|
||||
#include <QShortcut>
|
||||
#include <QCloseEvent>
|
||||
#include <unistd.h>
|
||||
#include <magic.h>
|
||||
#include <QComboBox>
|
||||
#include <QStringBuilder>
|
||||
#include <pwd.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class MainWindow; }
|
||||
@ -16,20 +44,35 @@ QT_END_NAMESPACE
|
||||
class Connexion
|
||||
{
|
||||
public:
|
||||
std::string bandwidthLimit = "1M";
|
||||
int bandwidthLimit = 0;
|
||||
std::string bandwidthLimitUnit = "";
|
||||
std::string server;
|
||||
std::string service;
|
||||
|
||||
int port = 873;
|
||||
};
|
||||
|
||||
class Downloading
|
||||
{
|
||||
public:
|
||||
std::string server;
|
||||
std::string service;
|
||||
std::string path;
|
||||
std::string defaultSavePath;
|
||||
std::string savePath;
|
||||
QString dirPath;
|
||||
int pid = 0;
|
||||
|
||||
void clear();
|
||||
};
|
||||
|
||||
class About
|
||||
{
|
||||
public:
|
||||
QString title = "RsyncUI";
|
||||
QString version = "1.8.8";
|
||||
QString author = "Daniel TARTAVEL-JEANNOT";
|
||||
QString licence = "GPL_V3";
|
||||
QString description;
|
||||
QString email = "dtux@free.fr";
|
||||
QString git = "https://git.labolyon.fr/dtux/RsyncUI/issues";
|
||||
};
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
@ -41,40 +84,44 @@ class MainWindow : public QMainWindow
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
QProgressDialog *progress;
|
||||
void displayTree();
|
||||
void populateTree();
|
||||
void populateList();
|
||||
void listServices();
|
||||
bool validateServer(std::string server);
|
||||
bool isIpAddress(std::string server);
|
||||
QTreeWidgetItem * addTreeRoot(QString name, QString description);
|
||||
QTreeWidgetItem * addTreeChild(QTreeWidgetItem *parent, QString name, QString size);
|
||||
void scanDir(std::string server, int portN, QTreeWidgetItem *parent = NULL, std::string path = "" );
|
||||
void startDownloading();
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
|
||||
int pid = 0;
|
||||
Connexion connexion;
|
||||
Downloading downloading;
|
||||
downloadFile downloadO;
|
||||
QSettings settings;
|
||||
About about;
|
||||
QDialog Configuration;
|
||||
Ui::Configuration config;
|
||||
std::vector <QString> serversList;
|
||||
map<char, int> bwUnixIndex {
|
||||
{'B', 0},
|
||||
{'K', 1},
|
||||
{'M', 2},
|
||||
{'G', 3},
|
||||
{'P', 4}
|
||||
};
|
||||
|
||||
void displayTree();
|
||||
void populateTree(QTreeWidgetItem * parent);
|
||||
void populateList();
|
||||
void listServices();
|
||||
bool validateServer(std::string server);
|
||||
bool isIpAddress(std::string server);
|
||||
QTreeWidgetItem * addTreeRoot(QString name, QString description, bool isDir);
|
||||
QTreeWidgetItem * addTreeChild(QTreeWidgetItem *parent, QString name, QString size, bool isDir);
|
||||
void scanDir(std::string server, int portN, QTreeWidgetItem *parent = NULL, std::string path = "" );
|
||||
void startDownloading();
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
void closeEvent (QCloseEvent *event);
|
||||
void saveDownloadList();
|
||||
void loadDownloadList();
|
||||
|
||||
private slots:
|
||||
void on_khistorycombobox_returnPressed();
|
||||
|
||||
//void on_portEdit_userTextChanged();
|
||||
void on_listWidget_clicked();
|
||||
|
||||
void on_portEdit_returnPressed();
|
||||
|
||||
void on_treeWidget_itemClicked(QTreeWidgetItem *item, int column);
|
||||
|
||||
void on_treeWidget_customContextMenuRequested();
|
||||
|
||||
void on_actionDownload_triggered();
|
||||
|
||||
void on_listWidget_clicked(const QModelIndex &index);
|
||||
|
||||
void on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);
|
||||
void on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadDir = false);
|
||||
|
||||
void downloadFinished();
|
||||
|
||||
@ -82,11 +129,25 @@ class MainWindow : public QMainWindow
|
||||
|
||||
void on_listDownload_itemClicked(QListWidgetItem *item);
|
||||
|
||||
signals:
|
||||
void stopDownloading(int);
|
||||
void on_actionAbout_triggered();
|
||||
|
||||
void on_actionAbout_Qt_triggered();
|
||||
|
||||
void on_khistorycombobox_currentIndexChanged(int);
|
||||
|
||||
bool on_DefaultSaveFolder_triggered();
|
||||
|
||||
void on_connectButton_clicked();
|
||||
|
||||
void on_action_Settings_triggered();
|
||||
|
||||
void on_actionDownload_triggered();
|
||||
|
||||
public slots:
|
||||
void on_buttonBox_accepted();
|
||||
|
||||
signals:
|
||||
void stopDownloading(int);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
206
mainwindow.ui
206
mainwindow.ui
@ -20,6 +20,9 @@
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||
</property>
|
||||
<property name="documentMode">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -57,7 +60,7 @@
|
||||
<cursorShape>IBeamCursor</cursorShape>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::TabFocus</enum>
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
<bool>true</bool>
|
||||
@ -98,6 +101,12 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Enter server's URL</string>
|
||||
</property>
|
||||
<property name="toolTipDuration">
|
||||
<number>5000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -133,9 +142,21 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Enter rsync port on server</string>
|
||||
</property>
|
||||
<property name="toolTipDuration">
|
||||
<number>5000</number>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhPreferNumbers</set>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string comment="numéro"/>
|
||||
</property>
|
||||
@ -156,6 +177,25 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="connectButton">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string extracomment="Connect to server">Press button to connect to rsync server</string>
|
||||
</property>
|
||||
<property name="toolTipDuration">
|
||||
<number>5000</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Connection</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Return</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
@ -174,9 +214,21 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Click to view the list of files of this folder</string>
|
||||
</property>
|
||||
<property name="toolTipDuration">
|
||||
<number>5000</number>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::SelectedClicked</set>
|
||||
</property>
|
||||
<property name="tabKeyNavigation">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="resizeMode">
|
||||
<enum>QListView::Adjust</enum>
|
||||
</property>
|
||||
@ -186,19 +238,6 @@
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="KTreeWidgetSearchLine" name="ktreewidgetsearchline">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhNoAutoUppercase</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="treeWidget">
|
||||
<property name="sizePolicy">
|
||||
@ -207,12 +246,27 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
<enum>Qt::ActionsContextMenu</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Click to add to download queue</string>
|
||||
</property>
|
||||
<property name="toolTipDuration">
|
||||
<number>5000</number>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="tabKeyNavigation">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -237,6 +291,9 @@
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="animated">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>1</number>
|
||||
</property>
|
||||
@ -253,10 +310,32 @@
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="KTreeWidgetSearchLine" name="ktreewidgetsearchline">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhNoAutoUppercase</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QListWidget" name="listDownload">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Click on file to stop downloading</string>
|
||||
</property>
|
||||
<property name="toolTipDuration">
|
||||
<number>5000</number>
|
||||
</property>
|
||||
<property name="dragEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -281,40 +360,87 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
<widget class="QToolBar" name="toolBar">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu">
|
||||
<property name="title">
|
||||
<string>Menu</string>
|
||||
</property>
|
||||
<addaction name="DefaultSaveFolder"/>
|
||||
</widget>
|
||||
<addaction name="menu"/>
|
||||
<property name="windowTitle">
|
||||
<string>toolBar</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="movable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="allowedAreas">
|
||||
<set>Qt::AllToolBarAreas</set>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||
</property>
|
||||
<property name="floatable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<addaction name="DefaultSaveFolder"/>
|
||||
<addaction name="action_Settings"/>
|
||||
<addaction name="actionAbout"/>
|
||||
<addaction name="actionAbout_Qt"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<action name="actionMenu">
|
||||
<property name="text">
|
||||
<string>Menu</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="DefaultSaveFolder">
|
||||
<property name="icon">
|
||||
<iconset theme="system-file-manager">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Default save folder</string>
|
||||
<string>Change save folder</string>
|
||||
</property>
|
||||
<property name="iconText">
|
||||
<string>Default save folder</string>
|
||||
<string>Change save folder</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionBandwidth_limit">
|
||||
<action name="actionAbout">
|
||||
<property name="icon">
|
||||
<iconset theme="help-about">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bandwidth limit</string>
|
||||
<string>About</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAbout_Qt">
|
||||
<property name="icon">
|
||||
<iconset theme="help-browser">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>About Qt</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Settings">
|
||||
<property name="icon">
|
||||
<iconset theme="preferences-other">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDownload">
|
||||
<property name="text">
|
||||
<string>Download</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Click on menu button to download the entire folder</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
102
tools.cpp
102
tools.cpp
@ -1,15 +1,14 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <pstreams/pstream.h>
|
||||
#include <QMessageBox>
|
||||
#include <ctype.h>
|
||||
#include "mainwindow.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define READ 0
|
||||
#define WRITE 1
|
||||
|
||||
//Take a string and explode it in array
|
||||
// s => string to explode
|
||||
// c => character separator
|
||||
// n => number of results in array, the last is the rest of string to end
|
||||
const vector<string> explode(const string& s, const char& c, int n = 0)
|
||||
{
|
||||
string buff;
|
||||
@ -42,61 +41,77 @@ const vector<string> explode(const string& s, const char& c, int n = 0)
|
||||
return v;
|
||||
}
|
||||
|
||||
FILE * popen2(array<string, 7> argv, string type, int & pid)
|
||||
// open a pipe, fork and return pid of child
|
||||
// argv => array of string with command in first and parameters following
|
||||
FILE * popen2(array<string,8> argv, string type, int & pid)
|
||||
{
|
||||
pid_t child_pid;
|
||||
int fd[2];
|
||||
pipe(fd);
|
||||
QString message;
|
||||
string command;
|
||||
|
||||
if((child_pid = fork()) == -1)
|
||||
if (pipe(fd) == -1)
|
||||
{
|
||||
perror("fork");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* child process */
|
||||
if (child_pid == 0)
|
||||
message = "Open pipe failed" + QString::fromStdString(strerror(errno));
|
||||
QMessageBox::warning(
|
||||
NULL,
|
||||
"RsyncUI",
|
||||
message);
|
||||
exit(-1);
|
||||
}else
|
||||
{
|
||||
if (type == "r")
|
||||
if((child_pid = fork()) == -1)
|
||||
{
|
||||
close(fd[READ]); //Close the READ end of the pipe since the child's fd is write-only
|
||||
dup2(fd[WRITE], 1); //Redirect stdout to pipe
|
||||
perror("fork");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* child process */
|
||||
if (child_pid == 0)
|
||||
{
|
||||
if (type == "r")
|
||||
{
|
||||
close(fd[READ]); //Close the READ end of the pipe since the child's fd is write-only
|
||||
dup2(fd[WRITE], 1); //Redirect stdout to pipe
|
||||
}
|
||||
else
|
||||
{
|
||||
close(fd[WRITE]); //Close the WRITE end of the pipe since the child's fd is read-only
|
||||
dup2(fd[READ], 0); //Redirect stdin to pipe
|
||||
}
|
||||
|
||||
setpgid(child_pid, child_pid); //Needed so negative PIDs can kill children of /bin/sh
|
||||
//TODO : change for execvp
|
||||
|
||||
if (execlp(argv[0].c_str(), argv[0].c_str(), argv[1].c_str(), argv[2].c_str(), argv[3].c_str(), argv[4].c_str(), argv[5].c_str(), NULL ) == -1)
|
||||
exit (0);
|
||||
}
|
||||
else
|
||||
{
|
||||
close(fd[WRITE]); //Close the WRITE end of the pipe since the child's fd is read-only
|
||||
dup2(fd[READ], 0); //Redirect stdin to pipe
|
||||
if (type == "r")
|
||||
{
|
||||
close(fd[WRITE]); //Close the WRITE end of the pipe since parent's fd is read-only
|
||||
}
|
||||
else
|
||||
{
|
||||
close(fd[READ]); //Close the READ end of the pipe since parent's fd is write-only
|
||||
}
|
||||
}
|
||||
|
||||
setpgid(child_pid, child_pid); //Needed so negative PIDs can kill children of /bin/sh
|
||||
if (execl(argv[0].c_str(), argv[0].c_str(), argv[1].c_str(), argv[2].c_str(), argv[3].c_str(), argv[4].c_str(), argv[5].c_str(), NULL ) == -1)
|
||||
{
|
||||
perror("execl error => ");
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
else
|
||||
{
|
||||
pid = child_pid;
|
||||
if (type == "r")
|
||||
{
|
||||
close(fd[WRITE]); //Close the WRITE end of the pipe since parent's fd is read-only
|
||||
}
|
||||
else
|
||||
{
|
||||
close(fd[READ]); //Close the READ end of the pipe since parent's fd is write-only
|
||||
return fdopen(fd[READ], "r");
|
||||
}
|
||||
return fdopen(fd[WRITE], "w");
|
||||
}
|
||||
|
||||
pid = child_pid;
|
||||
|
||||
if (type == "r")
|
||||
{
|
||||
return fdopen(fd[READ], "r");
|
||||
}
|
||||
|
||||
return fdopen(fd[WRITE], "w");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// close pipe open by popen2 while pid is finished
|
||||
// fp => file pointer
|
||||
// pid => pid of the processus open bu popen2
|
||||
|
||||
int pclose2(FILE * fp, pid_t pid)
|
||||
{
|
||||
int stat;
|
||||
@ -110,7 +125,6 @@ int pclose2(FILE * fp, pid_t pid)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return stat;
|
||||
}
|
||||
|
||||
|
8
tools.h
8
tools.h
@ -3,12 +3,14 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "mainwindow.h"
|
||||
#include <array>
|
||||
|
||||
using namespace std;
|
||||
|
||||
const vector<string> explode(const string& s, const char& c, int n = 0);
|
||||
FILE * popen2(array<string, 7> argv, string type, int & pid);
|
||||
const vector<string> explode(const string& s, const char& c, int n);
|
||||
|
||||
FILE * popen2(array<string,8> argv, string type, int & pid);
|
||||
|
||||
int pclose2(FILE * fp, pid_t pid);
|
||||
|
||||
#endif // TOOLS_H
|
||||
|
Reference in New Issue
Block a user