From 3ac113857071fc1f225b2e1b42547269e568c6b7 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Tue, 11 Aug 2020 22:35:12 +0100 Subject: New upstream version 2.2.4.4 --- little/main-little.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'little') diff --git a/little/main-little.cpp b/little/main-little.cpp index ca7de1a..0abafca 100644 --- a/little/main-little.cpp +++ b/little/main-little.cpp @@ -5,11 +5,15 @@ #include #include -#include "../Variable.h" -#include "../plugins/CopyEngine/Ultracopier/CopyEngineFactory.h" -#include "../plugins/Themes/Oxygen/ThemesFactory.h" +#ifndef ULTRACOPIER_LITTLE_RANDOM +#include "../plugins/CopyEngine/Ultracopier-Spec/CopyEngineFactory.h" +#else +#include "../plugins/CopyEngine/Random/CopyEngineFactory.h" +#endif +#include "../plugins/Themes/Oxygen2/ThemesFactory.h" #include "OptionsEngineLittle.h" #include "../FacilityEngine.h" +#include "../Version.h" #include Themes * interface=NULL; @@ -41,6 +45,8 @@ void connectEngine(); void connectInterfaceAndSync(); void periodicSynchronization(); +bool havePause=false; + /// \brief Define the main() for the point entry int main(int argc, char *argv[]) { @@ -49,6 +55,7 @@ int main(int argc, char *argv[]) qRegisterMetaType("Ultracopier::CopyMode"); qRegisterMetaType("Ultracopier::ItemOfCopyList"); qRegisterMetaType("std::string"); + qRegisterMetaType("std::wstring"); qRegisterMetaType >("std::vector"); qRegisterMetaType("Ultracopier::DebugLevel"); qRegisterMetaType("Ultracopier::EngineActionInProgress"); @@ -64,6 +71,7 @@ int main(int argc, char *argv[]) interface=static_cast(themesFactory.getInstance()); engine=static_cast(copyEngineFactory.getInstance()); + havePause=copyEngineFactory.havePause(); connectEngine(); connectInterfaceAndSync(); @@ -119,12 +127,12 @@ void connectInterfaceAndSync() failed|=!QObject::connect(interface,&Themes::resume, engine,&CopyEngine::resetSpeedDetectedInterface); failed|=!QObject::connect(interface,&Themes::urlDropped, engine,&CopyEngine::urlDropped,Qt::QueuedConnection);*/ failed|=!QObject::connect(interface,&Themes::cancel, engine,&CopyEngine::cancel,Qt::QueuedConnection); - failed|=!QObject::connect(engine,&CopyEngine::newActionOnList, engine,&CopyEngine::newActionOnList, Qt::QueuedConnection); + failed|=!QObject::connect(engine,&CopyEngine::newActionOnList, interface,&Themes::getActionOnList, Qt::QueuedConnection); failed|=!QObject::connect(engine,&CopyEngine::pushFileProgression, interface,&Themes::setFileProgression, Qt::QueuedConnection); failed|=!QObject::connect(engine,&CopyEngine::pushGeneralProgression, interface,&Themes::setGeneralProgression, Qt::QueuedConnection); - failed|=!QObject::connect(engine,&CopyEngine::pushGeneralProgression, engine,&CopyEngine::pushGeneralProgression, Qt::QueuedConnection); failed|=!QObject::connect(engine,&CopyEngine::errorToRetry, interface,&Themes::errorToRetry, Qt::QueuedConnection); + failed|=!QObject::connect(engine,&CopyEngine::doneTime, interface,&Themes::doneTime, Qt::QueuedConnection); if(failed) { @@ -133,6 +141,7 @@ void connectInterfaceAndSync() } interface->setSupportSpeedLimitation(engine->supportSpeedLimitation()); interface->setCopyType(Ultracopier::CopyType::FileAndFolder); + interface->havePause(havePause); interface->setTransferListOperation(Ultracopier::TransferListOperation::TransferListOperation_None); interface->actionInProgess(Ultracopier::EngineActionInProgress::Idle); //interface->isInPause(currentCopyInstance.isPaused); -- cgit v1.2.1