Skip to content

Commit

Permalink
Merge branch 'jb52717_reinit_logging_rules' into 'master'
Browse files Browse the repository at this point in the history
[mapplauncherd-qt5] Reinit logging. Contributes to JB#52717

See merge request mer-core/mapplauncherd-qt!5
  • Loading branch information
Tomin1 committed Feb 19, 2021
2 parents f82295b + ecdb737 commit 109137b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 9 additions & 1 deletion mdeclarativecache5/mdeclarativecache.cpp
Expand Up @@ -81,9 +81,12 @@ void MDeclarativeCachePrivate::populate()
}

qQuickViewInstance = new QQuickView();

}

#ifdef REINIT_LOGGING
void qt_reinit_logging(); // Defined in qtlogging.cpp
#endif

QGuiApplication *MDeclarativeCachePrivate::qApplication(int &argc, char **argv)
{
if (qApplicationInstance == 0)
Expand Down Expand Up @@ -121,6 +124,11 @@ QGuiApplication *MDeclarativeCachePrivate::qApplication(int &argc, char **argv)
qApp->setObjectName(appFileInfo.fileName());
qApplicationInstance->setApplicationName(appFileInfo.fileName());

#ifdef REINIT_LOGGING
// Reinitialize logging from new variables
qt_reinit_logging();
#endif

bool loadTestabilityArg = false;
const char* testabilityArg = "-testability";
for (int i = 0; i < argc; i++)
Expand Down
5 changes: 3 additions & 2 deletions rpm/mapplauncherd-qt5.spec
@@ -1,3 +1,4 @@
%bcond_with reinit_logging
Name: mapplauncherd-qt5
Summary: Application launch boosters for Qt5
Version: 1.0.0
Expand Down Expand Up @@ -45,8 +46,8 @@ using mapplauncherd.

%build
unset LD_AS_NEEDED
%qmake5 VERSION=`echo %{version} | sed 's/+.*//'`

%qmake5 VERSION=`echo %{version} | sed 's/+.*//'` \
%{?with_reinit_logging:"DEFINES+=REINIT_LOGGING"}
make %{?_smp_mflags}

%install
Expand Down

0 comments on commit 109137b

Please sign in to comment.