forked from qt-creator/qt-creator
Merge app_version.h and ide_version.h
Change-Id: I703d4704a3bdf88bd567c92512ee27db6aea043c Reviewed-on: http://codereview.qt.nokia.com/3918 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
This commit is contained in:
committed by
Daniel Molkentin
parent
b6835eaa80
commit
bbfa7e0020
@@ -34,8 +34,9 @@
|
||||
#include "shortcutsettings.h"
|
||||
#include "command_p.h"
|
||||
|
||||
#include <app/app_version.h>
|
||||
|
||||
#include <coreplugin/uniqueidmanager.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
|
||||
@@ -38,35 +38,6 @@
|
||||
namespace Core {
|
||||
namespace Constants {
|
||||
|
||||
#include "ide_version.h"
|
||||
|
||||
#define STRINGIFY_INTERNAL(x) #x
|
||||
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
|
||||
|
||||
#define IDE_VERSION STRINGIFY(IDE_VERSION_MAJOR) \
|
||||
"." STRINGIFY(IDE_VERSION_MINOR) \
|
||||
"." STRINGIFY(IDE_VERSION_RELEASE)
|
||||
|
||||
const char * const IDE_VERSION_LONG = IDE_VERSION;
|
||||
const char * const IDE_AUTHOR = "Nokia Corporation";
|
||||
const char * const IDE_YEAR = "2011";
|
||||
|
||||
#ifdef IDE_VERSION_DESCRIPTION
|
||||
const char * const IDE_VERSION_DESCRIPTION_STR = STRINGIFY(IDE_VERSION_DESCRIPTION);
|
||||
#else
|
||||
const char * const IDE_VERSION_DESCRIPTION_STR = "";
|
||||
#endif
|
||||
|
||||
#ifdef IDE_REVISION
|
||||
const char * const IDE_REVISION_STR = STRINGIFY(IDE_REVISION);
|
||||
#else
|
||||
const char * const IDE_REVISION_STR = "";
|
||||
#endif
|
||||
|
||||
#undef IDE_VERSION
|
||||
#undef STRINGIFY
|
||||
#undef STRINGIFY_INTERNAL
|
||||
|
||||
//modes
|
||||
const char * const MODE_WELCOME = "Welcome";
|
||||
const char * const MODE_WELCOME_TYPE = "Type.Welcome";
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
include(coreplugin_dependencies.pri)
|
||||
LIBS *= -l$$qtLibraryName(Core)
|
||||
# for ide_version.h
|
||||
INCLUDEPATH *= $$IDE_BUILD_TREE/src/plugins/coreplugin
|
||||
|
||||
@@ -222,6 +222,4 @@ else:unix {
|
||||
INSTALLS += image$${imagesize}
|
||||
}
|
||||
}
|
||||
OTHER_FILES += editormanager/BinFiles.mimetypes.xml ide_version.h.in
|
||||
|
||||
QMAKE_SUBSTITUTES += ide_version.h.in
|
||||
OTHER_FILES += editormanager/BinFiles.mimetypes.xml
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "coreconstants.h"
|
||||
#include "variablemanager.h"
|
||||
|
||||
#include <app/app_version.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/messagemanager.h>
|
||||
#include <coreplugin/filemanager.h>
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (info@qt.nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at info@qt.nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#define IDE_VERSION_MAJOR $$replace(QTCREATOR_VERSION, "^(\\d+)\\.\\d+\\.\\d+(-.*)?$", \\1)
|
||||
#define IDE_VERSION_MINOR $$replace(QTCREATOR_VERSION, "^\\d+\\.(\\d+)\\.\\d+(-.*)?$", \\1)
|
||||
#define IDE_VERSION_RELEASE $$replace(QTCREATOR_VERSION, "^\\d+\\.\\d+\\.(\\d+)(-.*)?$", \\1)
|
||||
@@ -75,6 +75,7 @@
|
||||
#include "externaltoolmanager.h"
|
||||
#include "editormanager/systemeditor.h"
|
||||
|
||||
#include <app/app_version.h>
|
||||
#include <coreplugin/findplaceholder.h>
|
||||
#include <coreplugin/icorelistener.h>
|
||||
#include <coreplugin/inavigationwidgetfactory.h>
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "versiondialog.h"
|
||||
|
||||
#include "coreconstants.h"
|
||||
#include "icore.h"
|
||||
|
||||
#include <app/app_version.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QtCore/QDate>
|
||||
@@ -49,7 +49,6 @@
|
||||
|
||||
using namespace Core;
|
||||
using namespace Core::Internal;
|
||||
using namespace Core::Constants;
|
||||
|
||||
VersionDialog::VersionDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
@@ -63,17 +62,17 @@ VersionDialog::VersionDialog(QWidget *parent)
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
layout->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
QString version = QLatin1String(IDE_VERSION_LONG);
|
||||
QString version = QLatin1String(Constants::IDE_VERSION_LONG);
|
||||
|
||||
QString ideVersionDescription;
|
||||
#ifdef IDE_VERSION_DESCRIPTION
|
||||
ideVersionDescription = tr("(%1)").arg(QLatin1String(IDE_VERSION_DESCRIPTION_STR));
|
||||
ideVersionDescription = tr("(%1)").arg(QLatin1String(Constants::IDE_VERSION_DESCRIPTION_STR));
|
||||
#endif
|
||||
|
||||
QString ideRev;
|
||||
#ifdef IDE_REVISION
|
||||
//: This gets conditionally inserted as argument %8 into the description string.
|
||||
ideRev = tr("From revision %1<br/>").arg(QString::fromLatin1(IDE_REVISION_STR).left(10));
|
||||
ideRev = tr("From revision %1<br/>").arg(QString::fromLatin1(Constants::IDE_REVISION_STR).left(10));
|
||||
#endif
|
||||
|
||||
const QString description = tr(
|
||||
@@ -91,8 +90,8 @@ VersionDialog::VersionDialog(QWidget *parent)
|
||||
"PARTICULAR PURPOSE.<br/>")
|
||||
.arg(version,
|
||||
QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize),
|
||||
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(IDE_YEAR),
|
||||
(QLatin1String(IDE_AUTHOR)), ideVersionDescription,
|
||||
QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(Constants::IDE_YEAR),
|
||||
(QLatin1String(Constants::IDE_AUTHOR)), ideVersionDescription,
|
||||
ideRev);
|
||||
|
||||
QLabel *copyRightLabel = new QLabel(description);
|
||||
|
||||
Reference in New Issue
Block a user