Ref T288, XPlane model in login component

This commit is contained in:
Klaus Basan
2018-07-13 01:44:43 +02:00
parent b16af78142
commit 6fd32bb00d
2 changed files with 13 additions and 14 deletions

View File

@@ -42,13 +42,14 @@ namespace XSwiftBus
g_xplanePath = xplanePath; g_xplanePath = xplanePath;
} }
std::string getDirName(const string &filePath) std::string getDirName(const std::string &filePath)
{ {
std::string seperator = "/\\"; std::string seperator = "/\\";
std::size_t sepPos = filePath.find_last_of(seperator); std::size_t sepPos = filePath.find_last_of(seperator);
if (sepPos != std::string::npos) if (sepPos != std::string::npos)
{ {
return filePath.substr(0, sepPos); std::string dirPath = filePath.substr(0, sepPos);
return getFileName(dirPath);
} }
else else
{ {

View File

@@ -7,6 +7,8 @@
* contained in the LICENSE file. * contained in the LICENSE file.
*/ */
//! \file
#ifndef BLACKSIM_XSWIFTBUS_UTILS_H #ifndef BLACKSIM_XSWIFTBUS_UTILS_H
#define BLACKSIM_XSWIFTBUS_UTILS_H #define BLACKSIM_XSWIFTBUS_UTILS_H
@@ -21,10 +23,6 @@
#include <clocale> #include <clocale>
#include <string> #include <string>
/*!
* \file
*/
/*! /*!
* Install a Qt message handler which outputs to the X-Plane debug log. * Install a Qt message handler which outputs to the X-Plane debug log.
*/ */