Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix QFileSystemWatcher debug warning on startup
  • Loading branch information
nyalldawson committed Aug 31, 2017
1 parent 15a48df commit 1037d47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -652,7 +652,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
QgsRuntimeProfiler *profiler = QgsApplication::profiler();

startProfile( QStringLiteral( "User profile manager" ) );
mUserProfileManager = new QgsUserProfileManager( "", this );
mUserProfileManager = new QgsUserProfileManager( QString(), this );
mUserProfileManager->setRootLocation( rootProfileLocation );
mUserProfileManager->setActiveUserProfile( activeProfile );
connect( mUserProfileManager, &QgsUserProfileManager::profilesChanged, this, &QgisApp::refreshProfileMenu );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsuserprofilemanager.cpp
Expand Up @@ -67,7 +67,7 @@ void QgsUserProfileManager::setRootLocation( const QString &rootProfileLocation
mWatcher->removePaths( mWatcher->directories() );
}

if ( QDir( mRootProfilePath ).exists() )
if ( !mRootProfilePath.isEmpty() && QDir( mRootProfilePath ).exists() )
{
mWatcher->addPath( mRootProfilePath );
}
Expand Down

0 comments on commit 1037d47

Please sign in to comment.