From 7f586ab22eee4c914901c608304d1da144bc3789 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Sat, 20 Sep 2008 10:27:13 +0200 Subject: [PATCH] Make compile on amd64 and friends --- CMakeLists.txt | 15 ++------------- src/common/quassel.h | 2 +- src/uisupport/actioncollection.cpp | 3 ++- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 650720a7..c8246094 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,19 +49,8 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH 1) # Enable various flags on gcc if(CMAKE_COMPILER_IS_GNUCXX) - include(CheckCXXCompilerFlag) - check_cxx_compiler_flag(-Wall HAVE_WALL) - if(HAVE_WALL) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") - endif(HAVE_WALL) - check_cxx_compiler_flag(-Wextra HAVE_WEXTRA) - if(HAVE_WEXTRA) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") - endif(HAVE_WEXTRA) - check_cxx_compiler_flag(-ansi HAVE_ANSI) - if(HAVE_ANSI) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi") - endif(HAVE_ANSI) + # Let's just hope that all gccs support these options and skip the tests... + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -Wall -Wextra -Wnon-virtual-dtor") endif(CMAKE_COMPILER_IS_GNUCXX) set(QT_MIN_VERSION "4.4.0") diff --git a/src/common/quassel.h b/src/common/quassel.h index 71c19b8e..40e2e12f 100644 --- a/src/common/quassel.h +++ b/src/common/quassel.h @@ -55,7 +55,7 @@ class Quassel { QString organizationDomain; }; - ~Quassel(); + virtual ~Quassel(); static inline const BuildInfo & buildInfo(); static inline RunMode runMode(); diff --git a/src/uisupport/actioncollection.cpp b/src/uisupport/actioncollection.cpp index 8a5d6067..9175eccb 100644 --- a/src/uisupport/actioncollection.cpp +++ b/src/uisupport/actioncollection.cpp @@ -51,6 +51,7 @@ QList ActionCollection::actions() const { Action *ActionCollection::addAction(const QString &name, Action *action) { QAction *act = addAction(name, static_cast(action)); + Q_UNUSED(act); Q_ASSERT(act == action); return action; } @@ -74,7 +75,7 @@ QAction *ActionCollection::addAction(const QString &name, QAction *action) { else action->setObjectName(indexName); if(indexName.isEmpty()) - indexName = QString("unnamed-%1").arg((int)action, 16); + indexName = indexName.sprintf("unnamed-%p", (void *)action); // do we already have this action? if(_actionByName.value(indexName, 0) == action) -- 2.20.1