Обновлён алгоритм работы с каталогами
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
#include <myx/base/config.hpp>
|
||||
|
||||
#include <myx/filesystem/paths.hpp>
|
||||
#include <myx/filesystem/paths_mt.hpp>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
@ -10,26 +9,18 @@
|
||||
|
||||
namespace MF = myx::filesystem;
|
||||
|
||||
// Переменные для защиты экземпляра класса MF::PathsMT
|
||||
std::atomic< MF::PathsMT* > MF::PathsMT::sInstance;
|
||||
std::mutex MF::PathsMT::sMutex;
|
||||
|
||||
|
||||
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();
|
||||
|
||||
pathsMT.init( QStringLiteral( CMLIB_PROJECT_NAME ), QStringLiteral( "conf" ) );
|
||||
pathsMT.findConfigFile( QStringLiteral( "test" ) );
|
||||
qDebug() << pathsMT.systemLogDirectory();
|
||||
qDebug() << pathsMT.systemConfigDirectory();
|
||||
MF::Paths& paths = MF::Paths::instance();
|
||||
|
||||
paths.init( QStringLiteral( CMLIB_PROJECT_NAME ), QStringLiteral( "conf" ) );
|
||||
|
||||
qDebug() << "prefixDirectory : " << paths.prefixDirectory();
|
||||
|
||||
qDebug() << "executableName : " << paths.executableName();
|
||||
qDebug() << "executableFilePath : " << paths.executableFilePath();
|
||||
qDebug() << "executableDirectory : " << paths.executableDirectory();
|
||||
|
Reference in New Issue
Block a user