Setting the application name with "-dev" suffix in debug builds and setting the organization name (for storing configs and other files in proper directory).

This commit is contained in:
2025-12-23 10:11:38 +01:00
parent c09aad88dc
commit 2c3d49db30
2 changed files with 10 additions and 0 deletions

View File

@ -19,6 +19,15 @@ using namespace std;
GenericCore::GenericCore() { GenericCore::GenericCore() {
qDebug() << "Creating core..."; 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) // TODO let the model own its undo stack (& use TableModel::getUndoStack() if necessary)
m_modelUndoStack = new QUndoStack(this); m_modelUndoStack = new QUndoStack(this);

View File

@ -43,6 +43,7 @@ class TableModel : public QAbstractTableModel {
private: private:
/// *** members *** /// *** members ***
// TODO shared_ptr -> unique_ptr
QList<shared_ptr<ModelItem>> m_items; QList<shared_ptr<ModelItem>> m_items;
QUndoStack* m_undoStack; QUndoStack* m_undoStack;