Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Commit

Permalink
Make sure that debug builds behave the same as release builds
Browse files Browse the repository at this point in the history
See issue #294
  • Loading branch information
ColinDuquesnoy committed Nov 19, 2018
1 parent b1f7deb commit 58bdfa4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 0 additions & 4 deletions src/lib/infrastructure/src/Application/SingleInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ void SingleInstance::pollState()

bool SingleInstance::checkForPrimary()
{
#ifdef QT_DEBUG
return true;
#else
QLockFile lockFile(QDir::tempPath() + QDir::separator() + qApp->applicationName() + ".lock");
lockFile.setStaleLockTime(0);
bool primary = false;
Expand All @@ -181,5 +178,4 @@ bool SingleInstance::checkForPrimary()
lockFile.unlock();
}
return primary;
#endif
}
5 changes: 1 addition & 4 deletions src/main/DI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ struct ApplicationFactory {

auto baseApplication = make_shared<Application>(qtApplication);

#ifdef QT_DEBUG
auto withLogging = make_shared<WithLogging>(baseApplication, commandLineArguments);
#else
IPlayer& player = injector.template create<IPlayer&>();
IFactory<ILocalServer, QString>& localServerFactory = injector.template create<IFactory<ILocalServer, QString>&>();
IFactory<ILocalSocket>& localSocketFactory = injector.template create<IFactory<ILocalSocket>&>();
Expand All @@ -118,7 +115,7 @@ struct ApplicationFactory {
commandLineArguments, localServerFactory,
localSocketFactory);
auto withLogging = make_shared<WithLogging>(singleInstance, commandLineArguments);
#endif

object_ = make_shared<WithCommandLineArguments>(withLogging, commandLineArguments);
}
return object_;
Expand Down

0 comments on commit 58bdfa4

Please sign in to comment.