From 2c3d49db3005cade44543a59ff27d44ae19892f6 Mon Sep 17 00:00:00 2001 From: Bent Witthold Date: Tue, 23 Dec 2025 10:11:38 +0100 Subject: [PATCH] Setting the application name with "-dev" suffix in debug builds and setting the organization name (for storing configs and other files in proper directory). --- genericcore.cpp | 9 +++++++++ model/tablemodel.h | 1 + 2 files changed, 10 insertions(+) diff --git a/genericcore.cpp b/genericcore.cpp index 4cf0500..e1a68a7 100644 --- a/genericcore.cpp +++ b/genericcore.cpp @@ -19,6 +19,15 @@ using namespace std; GenericCore::GenericCore() { qDebug() << "Creating core..."; + QCoreApplication::setOrganizationName("Working-Copy Collective"); + QCoreApplication::setOrganizationDomain("working-copy.org"); + +#ifdef QT_DEBUG + QCoreApplication::setApplicationName(QString(APPLICATION_NAME) + "-dev"); +#else + QCoreApplication::setApplicationName(QString(APPLICATION_NAME)); +#endif + // TODO let the model own its undo stack (& use TableModel::getUndoStack() if necessary) m_modelUndoStack = new QUndoStack(this); diff --git a/model/tablemodel.h b/model/tablemodel.h index 069179e..dd54f3a 100644 --- a/model/tablemodel.h +++ b/model/tablemodel.h @@ -43,6 +43,7 @@ class TableModel : public QAbstractTableModel { private: /// *** members *** + // TODO shared_ptr -> unique_ptr QList> m_items; QUndoStack* m_undoStack;