[Pkg-owncloud-commits] [owncloud-client] 60/333: Use AUTOMOC

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 5b561e44626812f6d85aad0d7eafc519aec9443f
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Wed Feb 19 11:55:08 2014 +0100

    Use AUTOMOC
    
    This should also fix the compilation of owncloudcmd.cpp
    Since we have a Q_OBJECT in a .cpp file and qt_wrap_cpp would not generate
    the moc file.
---
 src/CMakeLists.txt              | 9 ++-------
 src/owncloudcmd/owncloudcmd.cpp | 5 +++--
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a328f3d..c4e5c0c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,3 +1,5 @@
+set(CMAKE_AUTOMOC TRUE)
+
 include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
 
 qt_add_resources(MIRALL_RC_SRC ../mirall.qrc)
@@ -46,8 +48,6 @@ set(3rdparty_HEADER
 3rdparty/QProgressIndicator/QProgressIndicator.h
 )
 
-qt_wrap_cpp(3rdparty_MOC ${3rdparty_HEADER})
-
 if(NOT WIN32)
 	list(APPEND 3rdparty_SRC 3rdparty/qtlockedfile/qtlockedfile_unix.cpp)
 else()
@@ -150,7 +150,6 @@ IF( APPLE )
     list(APPEND libsync_SRCS mirall/folderwatcher_mac.cpp)
 ENDIF()
 
-qt_wrap_cpp(syncMoc ${libsync_HEADERS})
 
 # These headers are installed for libowncloudsync to be used by 3rd party apps
 set(owncloudsync_HEADERS
@@ -333,9 +332,6 @@ ENDIF()
 include_directories(../csync/src ../csync/src/httpbf/src ${CMAKE_CURRENT_BINARY_DIR}/../csync ${CMAKE_CURRENT_BINARY_DIR}/../csync/src )
 include_directories(${3rdparty_INC})
 
-qt_wrap_cpp(updaterMoc ${updater_HEADERS})
-qt_wrap_cpp(mirallMoc ${mirall_HEADERS})
-
 qt_add_translation(mirall_I18N ${TRANSLATIONS})
 
 set( final_src
@@ -446,7 +442,6 @@ endif()
 
 set(owncloudcmd_NAME ${APPLICATION_EXECUTABLE}cmd)
 set(OWNCLOUDCMD_SRC owncloudcmd/owncloudcmd.cpp)
-qt_wrap_cpp(OWNCLOUDCMD_MOCS owncloudcmd/owncloudcmd.cpp)
 add_executable(${owncloudcmd_NAME}  ${OWNCLOUDCMD_SRC})
 qt5_use_modules(${owncloudcmd_NAME} Network Sql)
 set_target_properties(${owncloudcmd_NAME} PROPERTIES
diff --git a/src/owncloudcmd/owncloudcmd.cpp b/src/owncloudcmd/owncloudcmd.cpp
index d1e668a..a053378 100644
--- a/src/owncloudcmd/owncloudcmd.cpp
+++ b/src/owncloudcmd/owncloudcmd.cpp
@@ -52,8 +52,6 @@ public slots:
         }
     }
 };
-#include "owncloudcmd/moc_owncloudcmd.cpp"
-
 
 int getauth(const char* prompt, char* buf, size_t len, int, int, void*)
 {
@@ -236,3 +234,6 @@ int main(int argc, char **argv) {
 
     return 0;
 }
+
+#include "owncloudcmd.moc"
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list