From 2ad5acdd29bff5e307527891824eeb168636a836 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Mon, 24 Jan 2011 20:45:15 +0000 Subject: [PATCH] Move version information in to separate file to decrease churn on svn up. Fix inverted error message for Avahi. --- src/CMakeLists.txt | 3 +++ src/config.h.in | 3 --- src/main.cpp | 1 + src/remote/avahi.cpp | 4 ++-- src/ui/mainwindow.cpp | 1 + src/version.h.in | 23 +++++++++++++++++++++++ 6 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 src/version.h.in diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cfc76ba46..02565a88a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -854,6 +854,9 @@ list(APPEND OTHER_SOURCES configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in + ${CMAKE_CURRENT_BINARY_DIR}/version.h) + qt4_wrap_cpp(MOC ${HEADERS}) qt4_wrap_ui(UIC ${UI}) qt4_add_resources(QRC ${RESOURCES}) diff --git a/src/config.h.in b/src/config.h.in index b4d824301..0087ece53 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -17,9 +17,6 @@ #ifndef CONFIG_H_IN #define CONFIG_H_IN -#define CLEMENTINE_VERSION_DISPLAY "${CLEMENTINE_VERSION_DISPLAY}" -#define CLEMENTINE_VERSION "${CLEMENTINE_VERSION_DEB}" - #define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" #cmakedefine ENABLE_WIIMOTEDEV diff --git a/src/main.cpp b/src/main.cpp index 45ef46c4f..9202989e3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -45,6 +45,7 @@ #include "ui/iconloader.h" #include "ui/mainwindow.h" #include "ui/systemtrayicon.h" +#include "version.h" #include "widgets/osd.h" #include "qtsingleapplication.h" diff --git a/src/remote/avahi.cpp b/src/remote/avahi.cpp index 1c5408627..3f0538c1d 100644 --- a/src/remote/avahi.cpp +++ b/src/remote/avahi.cpp @@ -88,8 +88,8 @@ void Avahi::CommitFinished(QDBusPendingCallWatcher* call) { call->deleteLater(); if (call->isError()) { - qDebug() << "Remote interface published on Avahi"; - } else { qWarning() << "Failed to commit Avahi changes:" << call->error().message(); + } else { + qDebug() << "Remote interface published on Avahi"; } } diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 2a9ddbc1a..145ba504a 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -78,6 +78,7 @@ #include "ui/settingsdialog.h" #include "ui/systemtrayicon.h" #include "ui/windows7thumbbar.h" +#include "version.h" #include "widgets/errordialog.h" #include "widgets/fileview.h" #include "widgets/multiloadingindicator.h" diff --git a/src/version.h.in b/src/version.h.in new file mode 100644 index 000000000..06e41d86d --- /dev/null +++ b/src/version.h.in @@ -0,0 +1,23 @@ +/* This file is part of Clementine. + + Clementine is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Clementine is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Clementine. If not, see . +*/ + +#ifndef VERSION_H_IN +#define VERSION_H_IN + +#define CLEMENTINE_VERSION_DISPLAY "${CLEMENTINE_VERSION_DISPLAY}" +#define CLEMENTINE_VERSION "${CLEMENTINE_VERSION_DEB}" + +#endif // VERSION_H_IN