Возвращение экземпляров синглтонов по ссылке

This commit is contained in:
2020-04-09 09:45:20 +03:00
parent 7ec97f8f19
commit e160b83c45
4 changed files with 15 additions and 15 deletions

View File

@ -19,18 +19,18 @@ int main( int argc, char** argv )
(void)argc;
(void)argv;
QCoreApplication::setApplicationName( QStringLiteral( CMLIB_PROJECT_NAME ) );
MF::PathsMT* pathsMT = MF::PathsMT::instance();
MF::Paths* paths = MF::Paths::instance();
MF::PathsMT& pathsMT = MF::PathsMT::instance();
MF::Paths& paths = MF::Paths::instance();
pathsMT->init( QStringLiteral( CMLIB_PROJECT_NAME ), QStringLiteral( "conf" ) );
pathsMT->findConfigFile( QStringLiteral( "test" ) );
qDebug() << pathsMT->systemLogDirectory();
qDebug() << pathsMT->systemConfigDirectory();
pathsMT.init( QStringLiteral( CMLIB_PROJECT_NAME ), QStringLiteral( "conf" ) );
pathsMT.findConfigFile( QStringLiteral( "test" ) );
qDebug() << pathsMT.systemLogDirectory();
qDebug() << pathsMT.systemConfigDirectory();
paths->init( QStringLiteral( CMLIB_PROJECT_NAME ), QStringLiteral( "conf" ) );
paths->findConfigFile( QStringLiteral( "test" ) );
qDebug() << paths->systemConstDataDirectory();
qDebug() << paths->configFileName();
paths.init( QStringLiteral( CMLIB_PROJECT_NAME ), QStringLiteral( "conf" ) );
paths.findConfigFile( QStringLiteral( "test" ) );
qDebug() << paths.systemConstDataDirectory();
qDebug() << paths.configFileName();
return( 0 );
}