Рефакторинг 2

This commit is contained in:
2020-04-22 10:17:37 +03:00
parent 44817a8a94
commit 4e2cff180c
21 changed files with 665 additions and 535 deletions

View File

@ -0,0 +1,41 @@
#ifndef MYX_BASE_CURRENT_EXECUTABLE_INL_HPP_
#define MYX_BASE_CURRENT_EXECUTABLE_INL_HPP_
#pragma once
#ifndef MYXLIB_HEADER_ONLY
#include <myx/filesystem/current_executable.hpp>
#endif
#include <myx/base/config.hpp>
#include <paths.h>
#include <QCoreApplication>
#include <QString>
namespace myx {
namespace filesystem {
#if !defined ( __linux__ )
error "Class CurrentExecutable is supported only in Linux"
#endif
CurrentExecutable::CurrentExecutable() :
m_procFilePath( QStringLiteral( "/proc/self/exe" ) )
{
m_canonicalFilePath = m_procFilePath.canonicalFilePath();
}
const QFileInfo& CurrentExecutable::canonicalFilePath() const
{
return( m_canonicalFilePath );
}
} // namespace filesystem
} // namespace myx
#endif // MYX_BASE_CURRENT_EXECUTABLE_INL_HPP_