From 9c4e3950b61c7eb0df7c1ade7b123af79b6cae7e Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Tue, 4 Aug 2015 15:38:12 +0200 Subject: [PATCH] build: updated Mac build to Qt 5.5 --- CMakeLists.txt | 6 +++++- README.md | 6 +++--- src/lib/Application.cpp | 11 ++++++++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e191484..5580fa20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,7 +118,11 @@ set(CMAKE_AUTOMOC ON) # Find the QtWidgets library set(CMAKE_PREFIX_PATH "$ENV{QT_DIR}/") +set(Qt5Widgets_DIR "$ENV{QT_DIR}/cmake/Qt5Widgets/") +set(Qt5PrintSupport_DIR "$ENV{QT_DIR}/cmake/Qt5PrintSupport/") + find_package(Qt5Widgets) +find_package(Qt5PrintSupport) if(Qt5Widgets_FOUND) MESSAGE(STATUS "Found Qt ${Qt5Widgets_VERSION_STRING}") @@ -128,7 +132,7 @@ if(Qt5Widgets_FOUND) endif() endif() -find_package(Qt5PrintSupport) + if (WIN32) file(WRITE ${CMAKE_SOURCE_DIR}/build/Coati.rc "// Icon with lowest ID value placed first to ensure application icon\n" diff --git a/README.md b/README.md index 2dbb9ec9..9681e968 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ ##### External Software -* QT 5.2.1 +* QT 5.5 * CxxTest 4.3 -* Valgrind 3.9.0(linux, macOS) +* Valgrind 3.9.0 (linux) * Clang & LLVM (installation guide http://clang.llvm.org/docs/LibASTMatchersTutorial.html) -* Boost 1.55 () +* Boost 1.55 * Eigen 3.2.3 ##### Environment Variables diff --git a/src/lib/Application.cpp b/src/lib/Application.cpp index 2f7f81d1..40a2b0d5 100644 --- a/src/lib/Application.cpp +++ b/src/lib/Application.cpp @@ -65,12 +65,17 @@ void Application::loadProject(const std::string& projectSettingsFilePath) m_project->parseCode(); std::vector recentProjects = ApplicationSettings::getInstance()->getRecentProjects(); - recentProjects.erase(std::find(recentProjects.begin(),recentProjects.end(),projectSettingsFilePath)); - recentProjects.insert(recentProjects.begin(),projectSettingsFilePath); - if(recentProjects.size() > 7) + if (recentProjects.size()) + { + recentProjects.erase(std::find(recentProjects.begin(), recentProjects.end(), projectSettingsFilePath)); + } + + recentProjects.insert(recentProjects.begin(), projectSettingsFilePath); + if (recentProjects.size() > 7) { recentProjects.pop_back(); } + ApplicationSettings::getInstance()->setRecentProjects(recentProjects); ApplicationSettings::getInstance()->save("data/ApplicationSettings.xml"); }