diff options
author | Louie S <louie@example.com> | 2024-03-18 15:16:01 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2024-03-18 15:16:01 -0400 |
commit | 4f6bf0f32483f524f2f654c9eaf9274d8e85af77 (patch) | |
tree | 9d6aa79f62d246aebe35d412ae7c221cbf5e6aac | |
parent | a394dab92712a7a588805df69cd89710071f3a51 (diff) |
Set settings with macro variables
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | config.h.in | 1 | ||||
-rw-r--r-- | src/assignmentList.cpp | 4 |
3 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 19fed72..4a87c05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.5) project(assignment-list VERSION 0.0.1 LANGUAGES CXX) +set(ORGANIZATION_NAME "assignment-list-qt") set(PROJECT_TITLE "Assignment List") set(CMAKE_CXX_STANDARD 17) diff --git a/config.h.in b/config.h.in index f1add5e..889eef1 100644 --- a/config.h.in +++ b/config.h.in @@ -3,6 +3,7 @@ #define PROJECT_NAME "@PROJECT_NAME@" #define PROJECT_TITLE "@PROJECT_TITLE@" +#define ORGANIZATION_NAME "@ORGANIZATION_NAME@" #define VERSION "@CMAKE_PROJECT_VERSION@" #define VERSION_MAJOR "@VERSION_MAJOR@" #define VERSION_MINOR "@VERSION_MINOR@" diff --git a/src/assignmentList.cpp b/src/assignmentList.cpp index c1e40f5..136af04 100644 --- a/src/assignmentList.cpp +++ b/src/assignmentList.cpp @@ -25,8 +25,8 @@ AssignmentList::AssignmentList() { // set QSettings information - QCoreApplication::setOrganizationName("assignment-list-qt"); // TODO grab this from a config.h type file - QCoreApplication::setApplicationName("assignment-list-qt"); // TODO grab this from a config.h type file + QCoreApplication::setOrganizationName(ORGANIZATION_NAME); + QCoreApplication::setApplicationName(PROJECT_NAME); // ensure QSettings location exists this->initializeSettings(); |