diff options
| author | 2008-04-19 15:37:13 +0000 | |
|---|---|---|
| committer | 2008-04-19 15:37:13 +0000 | |
| commit | 5626c55dbfef3e278efa0a55ce1d01a6c386c554 (patch) | |
| tree | c675847e1cb7ea71bd1f72d0e1ee22de39501ece /src | |
| parent | user documentation generation (aka "the help inside kvirc") (diff) | |
| download | KVIrc-5626c55dbfef3e278efa0a55ce1d01a6c386c554.tar.gz KVIrc-5626c55dbfef3e278efa0a55ce1d01a6c386c554.tar.bz2 KVIrc-5626c55dbfef3e278efa0a55ce1d01a6c386c554.zip | |
Splitted system configuration in two files. The frequently changing stuff in kvi_sysbuildinfo.h and is included ONLY from kbi_buildinfo.cpp in order to minimize recompilation cost.
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1525 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
| -rw-r--r-- | src/kvilib/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/kvilib/config/kvi_buildinfo.cpp | 39 | ||||
| -rw-r--r-- | src/kvilib/config/kvi_buildinfo.h | 36 | ||||
| -rw-r--r-- | src/kvilib/config/kvi_settings.h | 6 | ||||
| -rw-r--r-- | src/kvilib/config/kvi_wincfg.h | 2 | ||||
| -rw-r--r-- | src/kvirc/kernel/kvi_main.cpp | 6 | ||||
| -rw-r--r-- | src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp | 3 | ||||
| -rw-r--r-- | src/kvirc/kvs/kvi_kvs_treenode_switchlist.cpp | 2 | ||||
| -rw-r--r-- | src/kvirc/sparser/kvi_sp_ctcp.cpp | 4 | ||||
| -rw-r--r-- | src/modules/about/aboutdialog.cpp | 5 |
10 files changed, 94 insertions, 11 deletions
diff --git a/src/kvilib/CMakeLists.txt b/src/kvilib/CMakeLists.txt index 187e25396..896cca4b5 100644 --- a/src/kvilib/CMakeLists.txt +++ b/src/kvilib/CMakeLists.txt @@ -93,6 +93,7 @@ SET(kvilib_MOC_HDRS core/kvi_strasm.h core/kvi_string.h core/kvi_stringarray.h + config/kvi_buildinfo.h config/kvi_confignames.h config/kvi_debug.h config/kvi_defaults.h @@ -170,6 +171,7 @@ SET(kvilib_SRCS core/kvi_qstring.cpp core/kvi_string.cpp core/kvi_stringarray.cpp + config/kvi_buildinfo.cpp ) # After this call, files will be moc'ed to moc_kvi_*.cpp diff --git a/src/kvilib/config/kvi_buildinfo.cpp b/src/kvilib/config/kvi_buildinfo.cpp new file mode 100644 index 000000000..7d00bddd6 --- /dev/null +++ b/src/kvilib/config/kvi_buildinfo.cpp @@ -0,0 +1,39 @@ +//============================================================================= +// +// File : kvi_buildinfo.cpp +// Created on Sat 19 Apr 2008 17:01:57 by Szymon Stefanek +// +// This file is part of the KVIrc IRC Client distribution +// Copyright (C) 2008 Szymon Stefanek <s.stefanek at libero dot it> +// +// This program 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 2 +// of the License, or (at your opinion) any later version. +// +// This program 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 this program. If not, write to the Free Software Foundation, +// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +//============================================================================= + +#include "kvi_buildinfo.h" + +#if defined(_OS_WIN32_) || defined(Q_OS_WIN32) || defined(Q_OS_WIN32_) + #include "kvi_wincfg.h" +#else + #include "kvi_sysbuildinfo.h" +#endif + +namespace KviBuildInfo +{ + QString buildDate() + { + return QString(KVIRC_BUILD_DATE); + } +}; diff --git a/src/kvilib/config/kvi_buildinfo.h b/src/kvilib/config/kvi_buildinfo.h new file mode 100644 index 000000000..f17b19557 --- /dev/null +++ b/src/kvilib/config/kvi_buildinfo.h @@ -0,0 +1,36 @@ +#ifndef _KVI_BUILDINFO_H_ +#define _KVI_BUILDINFO_H_ +//============================================================================= +// +// File : kvi_buildinfo.h +// Created on Sat 19 Apr 2008 17:01:57 by Szymon Stefanek +// +// This file is part of the KVIrc IRC Client distribution +// Copyright (C) 2008 Szymon Stefanek <s.stefanek at libero dot it> +// +// This program 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 2 +// of the License, or (at your opinion) any later version. +// +// This program 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 this program. If not, write to the Free Software Foundation, +// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +//============================================================================= + +#include "kvi_settings.h" + +#include <QString> + +namespace KviBuildInfo +{ + QString buildDate(); +}; + +#endif //!_KVI_BUILDINFO_H_ diff --git a/src/kvilib/config/kvi_settings.h b/src/kvilib/config/kvi_settings.h index 33497208d..5d9bd2217 100644 --- a/src/kvilib/config/kvi_settings.h +++ b/src/kvilib/config/kvi_settings.h @@ -76,10 +76,6 @@ #define VERSION "?.?.?" #endif - #ifndef BUILD_DATE - #define BUILD_DATE "?" - #endif - #ifndef BUILD_FLAGS #define BUILD_FLAGS "?" #endif @@ -90,7 +86,6 @@ #define VERSION KVIRC_VERSION_RELEASE #define VERSION_BRANCH KVIRC_VERSION_BRANCH - #define BUILD_DATE KVIRC_BUILD_DATE #define BUILD_COMMAND KVIRC_BUILD_COMMAND #define BUILD_FLAGS KVIRC_BUILD_FLAGS #define BUILD_SYSTEM KVIRC_BUILD_SYSTEM @@ -112,7 +107,6 @@ #define KVI_VERSION VERSION #define KVI_VERSION_BRANCH VERSION_BRANCH -#define KVI_BUILD_DATE BUILD_DATE #define KVI_BUILD_COMMAND BUILD_COMMAND #define KVI_BUILD_FLAGS BUILD_FLAGS #define KVI_BUILD_SYSTEM BUILD_SYSTEM diff --git a/src/kvilib/config/kvi_wincfg.h b/src/kvilib/config/kvi_wincfg.h index 26fa8ed49..60ff4acd0 100644 --- a/src/kvilib/config/kvi_wincfg.h +++ b/src/kvilib/config/kvi_wincfg.h @@ -91,7 +91,7 @@ /* #undef COMPILE_GET_INTERFACE_ADDRESS */ /* this is the build date (configure date rather) */ -#define BUILD_DATE __DATE__" "__TIME__ +#define KVIRC_BUILD_DATE __DATE__" "__TIME__ /* these are the build flags */ #define BUILD_FLAGS "win32" diff --git a/src/kvirc/kernel/kvi_main.cpp b/src/kvirc/kernel/kvi_main.cpp index b27545469..0397427e7 100644 --- a/src/kvirc/kernel/kvi_main.cpp +++ b/src/kvirc/kernel/kvi_main.cpp @@ -31,6 +31,7 @@ #include "kvi_defaults.h" #include "kvi_sourcesdate.h" #include "kvi_msgbox.h" +#include "kvi_buildinfo.h" #ifndef COMPILE_NO_IPC extern bool kvi_sendIpcMessage(const char * message); // kvi_ipc.cpp @@ -77,7 +78,10 @@ int parseArgs(ParseArgs * a) { KviQString::appendFormatted(szMessage,"KVIrc %s '%s'\n",KVI_VERSION,KVI_RELEASE_NAME); KviQString::appendFormatted(szMessage,"Sources date: %s\n",KVI_SOURCES_DATE); - KviQString::appendFormatted(szMessage,"Build date: %s\n",KVI_BUILD_DATE); + szMessage += "Build date: "; + szMessage += KviBuildInfo::buildDate(); + szMessage += "\n"; + KviQString::appendFormatted(szMessage,"Home page: http://www.kvirc.net/\n"); #ifdef COMPILE_ON_WINDOWS diff --git a/src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp b/src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp index b19cbc54f..b8902a0cf 100644 --- a/src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp +++ b/src/kvirc/kvs/kvi_kvs_corefunctions_sz.cpp @@ -43,6 +43,7 @@ #include "kvi_mirccntrl.h" #include "kvi_sourcesdate.h" #include "kvi_socket.h" +#include "kvi_buildinfo.h" #include <stdlib.h> // rand & srand @@ -1033,7 +1034,7 @@ namespace KviKvsCoreFunctions else { if(szType.find('r') != -1)KVSCF_pRetBuffer->setString(KVI_RELEASE_NAME); else if(szType.find('s') != -1)KVSCF_pRetBuffer->setString(KVI_SOURCES_DATE); - else if(szType.find('b') != -1)KVSCF_pRetBuffer->setString(KVI_BUILD_DATE); + else if(szType.find('b') != -1)KVSCF_pRetBuffer->setString(KviBuildInfo::buildDate()); else KVSCF_pRetBuffer->setString(KVI_VERSION); } return true; diff --git a/src/kvirc/kvs/kvi_kvs_treenode_switchlist.cpp b/src/kvirc/kvs/kvi_kvs_treenode_switchlist.cpp index d6c51570a..8eed5a89a 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_switchlist.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_switchlist.cpp @@ -49,6 +49,7 @@ void KviKvsTreeNodeSwitchList::contextDescription(QString &szBuffer) void KviKvsTreeNodeSwitchList::dump(const char * prefix) { qDebug("%s SwitchList",prefix); +#if 0 if(m_pShortSwitchDict) { KviPointerHashTableIterator<int,KviKvsTreeNodeData> it(*m_pShortSwitchDict); @@ -76,6 +77,7 @@ void KviKvsTreeNodeSwitchList::dump(const char * prefix) ++it; } } +#endif } void KviKvsTreeNodeSwitchList::addShort(int iShortKey,KviKvsTreeNodeData * p) diff --git a/src/kvirc/sparser/kvi_sp_ctcp.cpp b/src/kvirc/sparser/kvi_sp_ctcp.cpp index 1e3f2bdd4..5c88cc623 100644 --- a/src/kvirc/sparser/kvi_sp_ctcp.cpp +++ b/src/kvirc/sparser/kvi_sp_ctcp.cpp @@ -55,6 +55,7 @@ #include "kvi_kvs_script.h" #include "kvi_sourcesdate.h" #include "kvi_regusersdb.h" +#include "kvi_buildinfo.h" #include <stdlib.h> @@ -1141,7 +1142,8 @@ void KviServerParser::parseCtcpRequestVersion(KviCtcpMessage *msg) #define QT4_TAG " (QT4) " - szVersion = "KVIrc " KVI_VERSION QT4_TAG " '" KVI_RELEASE_NAME "' " KVI_SOURCES_DATE " - build " KVI_BUILD_DATE; + szVersion = "KVIrc " KVI_VERSION QT4_TAG " '" KVI_RELEASE_NAME "' " KVI_SOURCES_DATE " - build "; + szVersion += KviBuildInfo::buildDate(); #ifdef COMPILE_ON_WINDOWS szVersion.append(QString(" - %1").arg(KviOsInfo::version())); #else diff --git a/src/modules/about/aboutdialog.cpp b/src/modules/about/aboutdialog.cpp index 3bf758e93..a47a8d965 100644 --- a/src/modules/about/aboutdialog.cpp +++ b/src/modules/about/aboutdialog.cpp @@ -29,6 +29,7 @@ #include "kvi_app.h" #include "kvi_fileutils.h" #include "kvi_sourcesdate.h" +#include "kvi_buildinfo.h" #include <kvi_tal_textedit.h> #include <QWidget> @@ -120,7 +121,9 @@ KviAboutDialog::KviAboutDialog() infoString += __tr2qs_ctx("Sources Date","about"); infoString += ": " KVI_SOURCES_DATE "<br>"; infoString += __tr2qs_ctx("Build Date","about"); - infoString += ": " KVI_BUILD_DATE "<br>"; + infoString += ": "; + infoString += KviBuildInfo::buildDate(); + infoString += "<br>"; infoString += __tr2qs_ctx("Build Command","about"); infoString += ": " KVI_BUILD_COMMAND "<br>"; infoString += __tr2qs_ctx("Build Flags","about"); |
