Skip to content

Commit

Permalink
feat:uavos#40 config versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylar Ooulhawk committed Mar 7, 2024
1 parent 51539cc commit 19d1103
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib/ApxCore/App/AppBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ AppBase *AppBase::_instance = nullptr;

AppBase::AppBase(int &argc, char **argv, const QString &name)
: QApplication(argc, argv)
, m_version{VERSION}
{
_instance = this;

Expand All @@ -75,7 +76,7 @@ AppBase::AppBase(int &argc, char **argv, const QString &name)
QApplication::setWindowIcon(QIcon("qrc:///icons/uavos-logo.icns"));

// app constants
m_version = VERSION;

apxConsole() << tr("Version").append(":") << m_version;

m_hash = GIT_HASH;
Expand Down
5 changes: 4 additions & 1 deletion src/lib/ApxCore/App/AppDirs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "AppDirs.h"
#include "AppBase.h"

#include <app_def.h>

Expand Down Expand Up @@ -54,8 +56,9 @@ QDir AppDirs::user()
#ifdef __ANDROID__
return QDir(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/.gcu");
#else
QString majorVersion = AppBase::version().split(".")[0];
return QDir(QDir(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation))
.absoluteFilePath("UAVOS"));
.absoluteFilePath("UAVOS_" + majorVersion));
#endif
}

Expand Down

0 comments on commit 19d1103

Please sign in to comment.