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
@@ -123,6 +123,7 @@ macx {
|
||||
}
|
||||
|
||||
INCLUDEPATH += \
|
||||
$$IDE_BUILD_TREE/src \ # for <app/app_version.h>
|
||||
$$IDE_SOURCE_TREE/src/libs \
|
||||
$$IDE_SOURCE_TREE/tools \
|
||||
$$IDE_SOURCE_TREE/src/plugins
|
||||
|
@@ -33,4 +33,8 @@ win32 {
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
OTHER_FILES += qtcreator.rc Info.plist.in
|
||||
OTHER_FILES += qtcreator.rc \
|
||||
Info.plist.in \
|
||||
$$PWD/app_version.h.in
|
||||
|
||||
QMAKE_SUBSTITUTES += $$PWD/app_version.h.in
|
||||
|
@@ -30,6 +30,39 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
namespace Core {
|
||||
namespace Constants {
|
||||
|
||||
#define STRINGIFY_INTERNAL(x) #x
|
||||
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
|
||||
|
||||
#define IDE_VERSION $${QTCREATOR_VERSION}
|
||||
#define IDE_VERSION_STR STRINGIFY(IDE_VERSION)
|
||||
|
||||
#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)
|
||||
|
||||
const char * const IDE_VERSION_LONG = IDE_VERSION_STR;
|
||||
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 IDE_VERSION_STR
|
||||
#undef STRINGIFY
|
||||
#undef STRINGIFY_INTERNAL
|
||||
|
||||
} // Constants
|
||||
} // Core
|
@@ -1,39 +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.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
#define STRINGIFY(x) #x
|
||||
#define APP_VERSION $${QTCREATOR_VERSION}
|
||||
#define APP_VERSION_STR STRINGIFY(APP_VERSION_STR)
|
||||
} // Internal
|
||||
} // Utils
|
@@ -40,7 +40,7 @@
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
#include "app_version.h"
|
||||
#include <app/app_version.h>
|
||||
|
||||
/*!
|
||||
\class Utils::NetworkManager
|
||||
@@ -134,7 +134,7 @@ void NetworkAccessManager::getUrl(const QUrl &url)
|
||||
QNetworkReply* NetworkAccessManager::createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData)
|
||||
{
|
||||
QString agentStr = QString::fromLatin1("Qt-Creator/%1 (QNetworkAccessManager %2; %3; %4; %5 bit)")
|
||||
.arg(APP_VERSION_STR).arg(qVersion())
|
||||
.arg(Core::Constants::IDE_VERSION_LONG).arg(qVersion())
|
||||
.arg(getOsString()).arg(QLocale::system().name())
|
||||
.arg(QSysInfo::WordSize);
|
||||
QNetworkRequest req(request);
|
||||
|
@@ -203,8 +203,3 @@ FORMS += $$PWD/filewizardpage.ui \
|
||||
$$PWD/checkablemessagebox.ui
|
||||
|
||||
RESOURCES += $$PWD/utils.qrc
|
||||
|
||||
OTHER_FILES += $$PWD/app_version.h.in
|
||||
|
||||
|
||||
QMAKE_SUBSTITUTES += $$PWD/app_version.h.in
|
||||
|
@@ -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>
|
||||
|
@@ -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);
|
||||
|
@@ -51,6 +51,7 @@
|
||||
#include "remotehelpfilter.h"
|
||||
#include "searchwidget.h"
|
||||
|
||||
#include <app/app_version.h>
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
#include <coreplugin/actionmanager/command.h>
|
||||
@@ -95,7 +96,6 @@
|
||||
#include <QtWebKit/QWebHistory>
|
||||
#endif
|
||||
|
||||
using namespace Core::Constants;
|
||||
using namespace Help::Internal;
|
||||
|
||||
const char * const SB_INDEX = QT_TRANSLATE_NOOP("Help::Internal::HelpPlugin", "Index");
|
||||
@@ -235,17 +235,17 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
action = new QAction(QIcon::fromTheme(QLatin1String("help-contents")),
|
||||
tr(SB_CONTENTS), this);
|
||||
cmd = am->registerAction(action, Core::Id("Help.Contents"), globalcontext);
|
||||
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(activateContents()));
|
||||
|
||||
action = new QAction(tr(SB_INDEX), this);
|
||||
cmd = am->registerAction(action, Core::Id("Help.Index"), globalcontext);
|
||||
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(activateIndex()));
|
||||
|
||||
action = new QAction(tr("Context Help"), this);
|
||||
cmd = am->registerAction(action, Core::Id("Help.Context"), globalcontext);
|
||||
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
cmd->setDefaultKeySequence(QKeySequence(Qt::Key_F1));
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(activateContext()));
|
||||
|
||||
@@ -253,24 +253,24 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
action = new QAction(this);
|
||||
action->setSeparator(true);
|
||||
cmd = am->registerAction(action, Core::Id("Help.Separator"), globalcontext);
|
||||
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
#endif
|
||||
|
||||
action = new QAction(tr("Technical Support"), this);
|
||||
cmd = am->registerAction(action, Core::Id("Help.TechSupport"), globalcontext);
|
||||
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(slotOpenSupportPage()));
|
||||
|
||||
action = new QAction(tr("Report Bug..."), this);
|
||||
cmd = am->registerAction(action, Core::Id("Help.ReportBug"), globalcontext);
|
||||
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(slotReportBug()));
|
||||
|
||||
#ifndef Q_WS_MAC
|
||||
action = new QAction(this);
|
||||
action->setSeparator(true);
|
||||
cmd = am->registerAction(action, Core::Id("Help.Separator2"), globalcontext);
|
||||
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||
#endif
|
||||
|
||||
action = new QAction(this);
|
||||
@@ -283,7 +283,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
action->setText(cmd->action()->text());
|
||||
action->setIcon(cmd->action()->icon());
|
||||
|
||||
if (Core::ActionContainer *advancedMenu = am->actionContainer(M_EDIT_ADVANCED)) {
|
||||
if (Core::ActionContainer *advancedMenu = am->actionContainer(Core::Constants::M_EDIT_ADVANCED)) {
|
||||
// reuse TextEditor constants to avoid a second pair of menu actions
|
||||
action = new QAction(tr("Increase Font Size"), this);
|
||||
cmd = am->registerAction(action, TextEditor::Constants::INCREASE_FONT_SIZE,
|
||||
@@ -304,11 +304,11 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
advancedMenu->addAction(cmd, Core::Constants::G_EDIT_FONT);
|
||||
}
|
||||
|
||||
if (Core::ActionContainer *windowMenu = am->actionContainer(M_WINDOW)) {
|
||||
if (Core::ActionContainer *windowMenu = am->actionContainer(Core::Constants::M_WINDOW)) {
|
||||
// reuse EditorManager constants to avoid a second pair of menu actions
|
||||
action = new QAction(QApplication::translate("EditorManager",
|
||||
"Next Open Document in History"), this);
|
||||
Core::Command *ctrlTab = am->registerAction(action, GOTOPREVINHISTORY,
|
||||
Core::Command *ctrlTab = am->registerAction(action, Core::Constants::GOTOPREVINHISTORY,
|
||||
modecontext); // Goto Previous In History Action
|
||||
windowMenu->addAction(ctrlTab, Core::Constants::G_WINDOW_NAVIGATE);
|
||||
connect(action, SIGNAL(triggered()), &OpenPagesManager::instance(),
|
||||
@@ -316,7 +316,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
|
||||
action = new QAction(QApplication::translate("EditorManager",
|
||||
"Previous Open Document in History"), this);
|
||||
Core::Command *ctrlShiftTab = am->registerAction(action, GOTONEXTINHISTORY,
|
||||
Core::Command *ctrlShiftTab = am->registerAction(action, Core::Constants::GOTONEXTINHISTORY,
|
||||
modecontext); // Goto Next In History Action
|
||||
windowMenu->addAction(ctrlShiftTab, Core::Constants::G_WINDOW_NAVIGATE);
|
||||
connect(action, SIGNAL(triggered()), &OpenPagesManager::instance(),
|
||||
@@ -618,7 +618,7 @@ void HelpPlugin::createRightPaneContextViewer()
|
||||
SLOT(setEnabled(bool)));
|
||||
|
||||
Core::ActionManager *am = m_core->actionManager();
|
||||
if (Core::ActionContainer *advancedMenu = am->actionContainer(M_EDIT_ADVANCED)) {
|
||||
if (Core::ActionContainer *advancedMenu = am->actionContainer(Core::Constants::M_EDIT_ADVANCED)) {
|
||||
// reuse TextEditor constants to avoid a second pair of menu actions
|
||||
QAction *action = new QAction(tr("Increase Font Size"), this);
|
||||
cmd = am->registerAction(action, TextEditor::Constants::INCREASE_FONT_SIZE,
|
||||
|
@@ -33,7 +33,7 @@
|
||||
#include "localhelpmanager.h"
|
||||
#include "bookmarkmanager.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <app/app_version.h>
|
||||
#include <coreplugin/helpmanager.h>
|
||||
|
||||
#include <QtCore/QMutexLocker>
|
||||
|
@@ -33,8 +33,7 @@
|
||||
#include "macro.h"
|
||||
#include "macroevent.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
|
||||
#include <app/app_version.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QtCore/QFileInfo>
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "persistentsettings.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <app/app_version.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
|
@@ -34,7 +34,7 @@
|
||||
|
||||
#include "qmlprojectconstants.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <app/app_version.h>
|
||||
#include <projectexplorer/customwizard/customwizard.h>
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
|
||||
|
@@ -44,7 +44,7 @@
|
||||
#include "s60certificatedetailsdialog.h"
|
||||
#include "symbianqtversion.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <app/app_version.h>
|
||||
|
||||
#include <utils/checkablemessagebox.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
Reference in New Issue
Block a user