Merge remote-tracking branch 'origin/2.6'

Conflicts:
	src/libs/utils/fileutils.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/genericdirectuploadservice.cpp
	src/tools/qtcreatorcrashhandler/main.cpp

Change-Id: I830287691e7085fe9c94597e23ec7be64eb8be42
This commit is contained in:
Eike Ziller
2012-10-09 11:50:17 +02:00
76 changed files with 538 additions and 292 deletions

2
dist/changes-2.1.0 vendored
View File

@@ -12,7 +12,7 @@ General
Editing
* Generic highlighter:
http://labs.qt.nokia.com/2010/09/16/generic-highlighter-in-qt-creator/
http://blog.qt.digia.com/2010/09/16/generic-highlighter-in-qt-creator/
C++ Support
* Added semantic highlighting of types, virtual methods, locals, statics and

View File

@@ -117,9 +117,10 @@ Component.prototype.createOperations = function()
"@TargetDir@/bin",
"@TargetDir@/bin");
component.addOperation( "CreateShortcut",
"@TargetDir@\\\bin\\qtcreator.exe",
"@TargetDir@\\bin\\qtcreator.exe",
"@StartMenuDir@/Qt Creator.lnk",
"workingDirectory=@homeDir@" );
component.addElevatedOperation("Execute", "{0,3010}", "@TargetDir@\\lib\\vcredist_msvc2010\\vcredist_x86.exe", "/q");
registerWindowsFileTypeExtensions();
}
if ( installer.value("os") == "x11" )

View File

@@ -640,7 +640,7 @@
does not have signals or slots, if it is intended to be used
with qobject_cast<>. See also \l{Casting}.
\o Normalize the arguments for signals and slots
(see \l{http://doc.qt.nokia.com/4.7/qmetaobject.html#normalizedSignature}{QMetaObject::normalizedSignature}
(see \l{http://qt-project.org/doc/qt-4.8/qmetaobject.html#normalizedSignature}{QMetaObject::normalizedSignature}
inside connect statements
to safely make signal and slot lookup a few cycles faster.
You can use $QTDIR/util/normalize to normalize existing code.

View File

@@ -34,8 +34,8 @@
\section1 Location
User specific tools are located in \c {$HOME/.config/Nokia/qtcreator/externaltools}
on Mac and Linux, and in \c {%APPDATA%\Nokia\qtcreator\externaltools} on Windows.
User specific tools are located in \c {$HOME/.config/QtProject/qtcreator/externaltools}
on Mac and Linux, and in \c {%APPDATA%\QtProject\qtcreator\externaltools} on Windows.
System wide tools are located in \c {<Qt Creator install>/share/qtcreator/externaltools}
on Windows and Linux, and in \c {Qt Creator.app/Contents/Resources/externaltools} on Mac.

View File

@@ -98,7 +98,7 @@
plugin directory (requires you to have write permissions there).
The other option, \gui{Local user settings}, sets your .pro file up to
deploy your plugin into \QC's user plugin path
(for example \c{~/.config/Nokia/qtcreator/plugins} on Unix systems).
(for example \c{~/.config/QtProject/qtcreator/plugins} on Unix systems).
We choose \gui{Qt Creator build} because we use a self-compiled
\QC, and want the plugin to be only loaded by that \QC
instance.
@@ -223,7 +223,7 @@
need to add the corresponding .pri file of the plugin here.
For more information about qmake, and writing .pro files in general,
see the \l{http://doc.qt.nokia.com/4.7/qmake-manual.html}{qmake Manual}.
see the \l{http://qt-project.org/doc/qt-4.8/qmake-manual.html}{qmake Manual}.
\section1 Plugin Specification

View File

@@ -177,7 +177,7 @@
\list
\o If the dependency can be resolved, the plugin and
its dependency are loaded and initialized as for \c required dependencies.
\o If the dependency can not be resolved, the plugin is loaded and initialized
\o If the dependency cannot be resolved, the plugin is loaded and initialized
as if the dependency was not declared at all.
\endlist

View File

@@ -23,7 +23,7 @@
\section1 Introduction
If the functionality provided by template-based
\l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-project-wizards.html}{custom wizards}
\l{http://doc.qt.digia.com/qtcreator-snapshot/creator-project-wizards.html}{custom wizards}
is not sufficient for your case, you can write wizards in code.
A wizard in Qt Creator is an instance of a class implementing

View File

@@ -53,7 +53,7 @@
to which you can add your own snippets.
\list
\o \l{http://doc.qt.nokia.com/qtcreator/creator-completing-code.html#editing-code-snippets}
\o \l{http://doc.qt.digia.com/qtcreator/creator-completing-code.html#editing-code-snippets}
{Snippets User Interface}
\o \l{Snippets} {Adding Snippets Groups}
\endlist
@@ -64,7 +64,7 @@
own
file and project templates by writing XML definition files for them.
\list
\o \l{http://doc.qt.nokia.com/qtcreator/creator-project-wizards.html}
\o \l{http://doc.qt.digia.com/qtcreator/creator-project-wizards.html}
{Adding New Custom Wizards}
\o \l{User Interface Text Guidelines}
\endlist
@@ -96,7 +96,7 @@
the MIME type definitions in Qt Creator to your specific setup,
by adding or removing file extensions and specifying magic headers.
\list
\o \l{http://doc.qt.nokia.com/qtcreator/creator-mime-types.html}
\o \l{http://doc.qt.digia.com/qtcreator/creator-mime-types.html}
{Editing MIME Types}
\o \l{http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html}
{MIME Type Specification Files}
@@ -110,7 +110,7 @@
provided by the Kate Editor. You can download highlight definition files
for use with Qt Creator and create your own definition files.
\list
\o \l{http://doc.qt.nokia.com/qtcreator/creator-editor-options.html#generic-highlighting}
\o \l{http://doc.qt.digia.com/qtcreator/creator-editor-options.html#generic-highlighting}
{Generic Highlighting}
\o \l{http://kate-editor.org/2005/03/24/writing-a-syntax-highlighting-file/}
{Writing a Syntax Highlighting File}
@@ -162,7 +162,7 @@
to fill a feature suggestion.
The tool descriptions are saved as XML files that you can share.
\list
\o \l{http://doc.qt.nokia.com/qtcreator/creator-editor-external.html}
\o \l{http://doc.qt.digia.com/qtcreator/creator-editor-external.html}
{Using External Tools}
\o \l{External Tool Specification Files}
\endlist
@@ -189,7 +189,7 @@
If you need a way to configure the tool in Qt Creator, you can add an
\gui Options page for it.
\list
\o \l{http://doc.qt.nokia.com/qtcreator/creator-editor-external.html}
\o \l{http://doc.qt.digia.com/qtcreator/creator-editor-external.html}
{Using External Tools}
\o \l{External Tool Specification Files}
\o \l{Creating Plugins}
@@ -214,7 +214,7 @@
the \gui {Issues} output
pane.
\list
\o \l{http://doc.qt.nokia.com/qtcreator/creator-task-lists.html}
\o \l{http://doc.qt.digia.com/qtcreator/creator-task-lists.html}
{Showing Task List Files in the Issues Pane}
\o \l{Creating Plugins}
\o \l{Qt Creator Coding Rules}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -42,6 +42,9 @@
You can either create Qt Quick projects from scratch or import
existing projects to \QC. You can use the code editor (Edit mode)
or the visual editor (Design mode) to develop Qt Quick applications.
However, the visual editor only supports Qt Quick 1, which is
offered in Qt 5 only for compatibility with Qt 4. We recommend that
you use Qt Quick 2 for new Qt 5 applications.
\o \l{Developing Widget Based Applications}
Widgets and forms created with \QD are integrated seamlessly with

View File

@@ -38,9 +38,9 @@
\list
\o \l{Creating a Qt Quick Application}
\o \l{Creating a Qt Quick 1 Application}
Learn about the basic Qt Quick concepts and QML elements.
Learn how to use \QMLD to create a Qt Quick 1 application.
\o \l{Creating a Qt Widget Based Application}

View File

@@ -136,7 +136,7 @@
\o HTML5 Application
Use a QtWebKit view to desigm the user interface and HTML5 and
Use a QtWebKit view to design the user interface and HTML5 and
C++ code to implement the application logic
\o Qt Quick UI
@@ -176,16 +176,9 @@
Qt unit tests for features or classes
\if defined(qcmanual)
\o Qt Custom Designer Widgets
Custom \QD widget or widget collection
\endif
\o Plain C/C++ Project
Plain C or C++ project that uses qmake but does not use the Qt
library
\o Empty Qt Project
@@ -201,7 +194,19 @@
\o Non-Qt Projects
Plain C or C++ projects that use CMake but do not use the Qt library
\list
\o Plain C or C++ Project
Plain C or C++ project that uses qmake but does not use the Qt
library
\o Plain C or C++ Project (CMake Build)
Plain C or C++ project that uses CMake but does not use the Qt
library
\endlist
\o Import Project

View File

@@ -31,15 +31,17 @@
\title Adding Libraries to Projects
In addition to Qt libraries, you can add other libraries to your projects.
The way the library is added depends on whether it is a system library or
your own library or a 3rd party library located in the build tree of the
The way the library is added depends on the type and location of the
library. You can add a system library, your own library, or a 3rd party
library. The library can be located either in the build tree of the
current project or in another build tree.
\image qtcreator-add-library-wizard.png "Add Library wizard"
Because system libraries do not typically change and are often found by
default, you do not need to specify the path to the library or to its
includes when you add it.
includes when you add it. You can use \c{pkg-config} to query system
libraries during compilation.
For your own libraries and 3rd party libraries, you need to specify
the paths. \QC tries to guess the include path for an external library,

View File

@@ -36,7 +36,7 @@
You can use the code editor (\l{Working in Edit Mode}{Edit mode}) or the
visual editor (\l{Using Qt Quick Designer}{Design mode}) to develop Qt Quick
applications.
applications.However, the visual editor only supports Qt Quick 1.
Typically, application development proceeds as follows:

View File

@@ -28,12 +28,16 @@
\page creator-qml-application.html
\nextpage creator-writing-program.html
\title Creating a Qt Quick Application
\title Creating a Qt Quick 1 Application
\note To complete this tutorial, you must have Qt 4.7 or later installed.
\note \QMLD only supports Qt Quick 1, which is offered in Qt 5 only for
compatibility with Qt 4. We recommend that you use Qt Quick 2 for new
Qt 5 applications. You can use the code editor in the \gui Design mode to
develop Qt Quick 2 applications. For more information, see the Qt 5
documentation.
This tutorial uses built-in QML elements and illustrates basic concepts of
\l {http://qt-project.org/doc/qt-4.8/qtquick.html}{Qt Quick}.
\l {http://qt-project.org/doc/qt-4.8/qtquick.html}{Qt Quick 1}.
This tutorial describes how to use the \QC to implement the
\l{http://qt-project.org/doc/qt-4.8/declarative-animation-states.html}
@@ -51,12 +55,13 @@
\list 1
\o Select \gui{File > New File or Project > Applications >
Qt Quick Application (Built-in Elements) > Choose}.
Qt Quick 1 Application (Built-in Elements) > Choose}.
\o In the \gui{Name} field, type \bold {Transitions}.
\o In the \gui {Create in} field, enter the path for the project files.
For example, \c {C:\Qt\examples}, and then click \gui{Next}.
For example, \c {C:\Qt\examples}, and then click \gui{Next} (on
Windows and Linux) or \gui Continue (on Mac OS).
\o Select \l{glossary-buildandrun-kit}{kits} for running and building your project,
and then click \gui{Next}.
@@ -67,10 +72,10 @@
\o Select \gui Next in the following dialogs to use the default
settings.
\o Review the project settings, and click \gui{Finish} to create the
project.
\o Review the project settings, and click \gui{Finish} (on Windows and
Linux) or \gui Done (on Mac OS) to create the project.
\o Press \key {Ctrl+R} to run the application.
\o Press \key {Ctrl+R} (or \key {Cmd+R})to run the application.
\endlist

View File

@@ -32,6 +32,8 @@
You can edit .qml files in the \QMLD visual editor or in the code editor.
\note \QMLD only supports Qt Quick 1.
In \gui Projects, double-click a .qml file to open it in the code editor.
Then select the \gui {Design} mode to edit the file in the visual editor.

View File

@@ -4,7 +4,7 @@ import qbs.fileinfo 1.0 as FileInfo
Module {
Depends { id: qtcore; name: "Qt.core" }
additionalProductFileTags: qtcore.versionMajor < 5 ? ["pluginSpec"] : ["pluginJSON"]
additionalProductFileTags: qtcore.versionMajor < 5 ? ["pluginSpec"] : ["qt_plugin_metadata"]
property int ide_version_major: project.ide_version_major
property int ide_version_minor: project.ide_version_minor
property int ide_version_release: project.ide_version_release
@@ -71,7 +71,7 @@ Module {
inputs: ["pluginSpec"]
Artifact {
fileTags: ["pluginJSON"]
fileTags: ["qt_plugin_metadata"]
fileName: {
var destdir = FileInfo.joinPaths(product.modules["qt/core"].generatedFilesDir,
input.fileName);

View File

@@ -3,10 +3,6 @@ QTCREATOR_PRI_INCLUDED = 1
QTCREATOR_VERSION = 2.6.81
isEmpty(QTC_PREFIX) {
unix:!macx: QTC_PREFIX = /usr/local
}
isEqual(QT_MAJOR_VERSION, 5) {
defineReplace(cleanPath) {

View File

@@ -545,8 +545,8 @@ int main(int argc, char ** argv)
Application app(argc, argv);
app.setApplicationName("QtQmlViewer");
app.setOrganizationName("Nokia");
app.setOrganizationDomain("nokia.com");
app.setOrganizationName("QtProject");
app.setOrganizationDomain("qt-project.org");
QDeclarativeViewer::registerTypes();
QDeclarativeTester::registerTypes();

View File

@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication application(argc, argv);
QCoreApplication::setOrganizationName("Nokia");
QCoreApplication::setOrganizationDomain("nokia.com");
QCoreApplication::setOrganizationName("QtProject");
QCoreApplication::setOrganizationDomain("qt-project.org");
QCoreApplication::setApplicationName("Qml2Puppet");
QCoreApplication::setApplicationVersion("1.0.0");

View File

@@ -53,8 +53,8 @@ int main(int argc, char *argv[])
QApplication application(argc, argv);
QCoreApplication::setOrganizationName("Nokia");
QCoreApplication::setOrganizationDomain("nokia.com");
QCoreApplication::setOrganizationName("QtProject");
QCoreApplication::setOrganizationDomain("qt-project.org");
QCoreApplication::setApplicationName("QmlPuppet");
QCoreApplication::setApplicationVersion("1.1.0");

View File

@@ -24,9 +24,9 @@ isEmpty(IDE_BUILD_TREE):IDE_BUILD_TREE=%QtCreatorBuild%
## uncomment to build plugin into user config directory
## <localappdata>/plugins/<ideversion>
## where <localappdata> is e.g.
## "%LOCALAPPDATA%\Nokia\qtcreator" on Windows Vista and later
## "$XDG_DATA_HOME/Nokia/qtcreator" or "~/.local/share/data/Nokia/qtcreator" on Linux
## "~/Library/Application Support/Nokia/Qt Creator" on Mac
## "%LOCALAPPDATA%\QtProject\qtcreator" on Windows Vista and later
## "$XDG_DATA_HOME/QtProject/qtcreator" or "~/.local/share/data/QtProject/qtcreator" on Linux
## "~/Library/Application Support/QtProject/Qt Creator" on Mac
%DestDir%USE_USER_DESTDIR = yes
PROVIDER = %VendorName%
@@ -34,4 +34,4 @@ PROVIDER = %VendorName%
include($$QTCREATOR_SOURCES/src/qtcreatorplugin.pri)
include($$QTCREATOR_SOURCES/src/plugins/coreplugin/coreplugin.pri)
LIBS += -L$$IDE_PLUGIN_PATH/Nokia
LIBS += -L$$IDE_PLUGIN_PATH/QtProject

View File

@@ -129,13 +129,13 @@ Rectangle {
IconAndLink {
iconName: "communityIcon"
linkText: qsTr("Online Community")
onClicked: gettingStarted.openUrl("http://developer.qt.nokia.com/forums")
onClicked: gettingStarted.openUrl("http://qt-project.org/forums")
}
IconAndLink {
iconName: "labsIcon"
linkText: qsTr("Labs")
onClicked: gettingStarted.openUrl("http://labs.qt.nokia.com")
linkText: qsTr("Blogs")
onClicked: gettingStarted.openUrl("http://planet.qt-project.org")
}
}

View File

@@ -34,6 +34,6 @@ DummyContextObject {
property variant model: QtObject {
property string name: "Calculator"
property string description: "his demo shows how to write a simple calculator application in QML and JavaScript."
property string imageSource: "http://doc.qt.nokia.com/4.7/images/qml-calculator-example-small.png"
property string imageSource: "http://qt-project.org/doc/qt-4.8/images/qml-calculator-example-small.png"
}
}

View File

@@ -33,27 +33,27 @@ ListModel {
ListElement {
name: "Calculator with more info on something bla bla on Qt if you know"
description: "his demo shows how to write a simple calculator application in QML and JavaScript."
imageSource: "http://doc.qt.nokia.com/4.7/images/qml-calculator-example-small.png"
imageSource: "http://qt-project.org/doc/qt-4.8/images/qml-calculator-example-small.png"
}
ListElement {
name: "RSS News Reader"
description: "This demo shows how to write a RSS news reader in QML."
imageSource: "http://doc.qt.nokia.com/4.7/images/qml-rssnews-demo-small.png"
imageSource: "http://qt-project.org/doc/qt-4.8/images/qml-rssnews-demo-small.png"
}
ListElement {
name: "Twitter"
description: "This demo shows how to write a mobile Twitter search client in QML. Use it to see what people think about Qt Quick!"
imageSource: "http://doc.qt.nokia.com/4.7/images/qml-twitter-demo-small.png"
imageSource: "http://qt-project.org/doc/qt-4.8/images/qml-twitter-demo-small.png"
}
ListElement {
name: "Basic Drawing Example"
description: "The Basic Drawing example shows how to display basic graphics primitives in a variety of styles using the QPainter class."
imageSource: "http://doc.qt.nokia.com/4.7/images/basicdrawing-example.png"
imageSource: "http://qt-project.org/doc/qt-4.8/images/basicdrawing-example.png"
}
ListElement {
name: "Border Layout Example"
description: "The Border Layout example shows how to create a custom layout that arranges child widgets according to a simple set of rules. The Border Layout example shows how to create a custom layout that arranges child widgets according to a simple set of rules. The Border Layout example shows how to create a custom layout that arranges child widgets according to a simple set of rules. The Border Layout example shows how to create a custom layout that arranges child widgets according to a simple set of rules."
imageSource: "http://doc.qt.nokia.com/4.7/images/borderlayout-example.png"
imageSource: "http://qt-project.org/doc/qt-4.8/images/borderlayout-example.png"
}
}

View File

@@ -212,7 +212,7 @@
<key>CFBundleExecutable</key>
<string>Qt Creator</string>
<key>CFBundleIdentifier</key>
<string>com.nokia.qtcreator</string>
<string>org.qt-project.qtcreator</string>
<key>CFBundleVersion</key>
<string>$$QTCREATOR_VERSION</string>
<key>CFBundleShortVersionString</key>

View File

@@ -63,9 +63,16 @@ const char * const IDE_REVISION_STR = \"\";
#ifdef IDE_SETTINGSVARIANT
const char * const IDE_SETTINGSVARIANT_STR = STRINGIFY(IDE_SETTINGSVARIANT);
#else
const char * const IDE_SETTINGSVARIANT_STR = \"Nokia\";
const char * const IDE_SETTINGSVARIANT_STR = \"QtProject\";
#endif
#ifdef IDE_COPY_SETTINGS_FROM_VARIANT
const char * const IDE_COPY_SETTINGS_FROM_VARIANT_STR = STRINGIFY(IDE_COPY_SETTINGS_FROM_VARIANT);
#else
const char * const IDE_COPY_SETTINGS_FROM_VARIANT_STR = \"Nokia\";
#endif
#undef IDE_VERSION
#undef IDE_VERSION_STR
#undef STRINGIFY

View File

@@ -161,6 +161,33 @@ static inline int askMsgSendFailed()
QMessageBox::Retry);
}
// taken from utils/fileutils.cpp. We can not use utils here since that depends app_version.h.
static bool copyRecursively(const QString &srcFilePath,
const QString &tgtFilePath)
{
QFileInfo srcFileInfo(srcFilePath);
if (srcFileInfo.isDir()) {
QDir targetDir(tgtFilePath);
targetDir.cdUp();
if (!targetDir.mkdir(QFileInfo(tgtFilePath).fileName()))
return false;
QDir sourceDir(srcFilePath);
QStringList fileNames = sourceDir.entryList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden | QDir::System);
foreach (const QString &fileName, fileNames) {
const QString newSrcFilePath
= srcFilePath + QLatin1Char('/') + fileName;
const QString newTgtFilePath
= tgtFilePath + QLatin1Char('/') + fileName;
if (!copyRecursively(newSrcFilePath, newTgtFilePath))
return false;
}
} else {
if (!QFile::copy(srcFilePath, tgtFilePath))
return false;
}
return true;
}
static inline QStringList getPluginPaths()
{
QStringList rc;
@@ -183,9 +210,9 @@ static inline QStringList getPluginPaths()
#endif
// 3) <localappdata>/plugins/<ideversion>
// where <localappdata> is e.g.
// <drive>:\Users\<username>\AppData\Local\Nokia\qtcreator on Windows Vista and later
// $XDG_DATA_HOME or ~/.local/share/data/Nokia/qtcreator on Linux
// ~/Library/Application Support/Nokia/Qt Creator on Mac
// <drive>:\Users\<username>\AppData\Local\QtProject\qtcreator on Windows Vista and later
// $XDG_DATA_HOME or ~/.local/share/data/QtProject/qtcreator on Linux
// ~/Library/Application Support/QtProject/Qt Creator on Mac
pluginPath = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
pluginPath += QLatin1Char('/')
+ QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR)
@@ -201,6 +228,55 @@ static inline QStringList getPluginPaths()
return rc;
}
static QSettings *createUserSettings()
{
return new QSettings(QSettings::IniFormat, QSettings::UserScope,
QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR),
QLatin1String("QtCreator"));
}
static inline QSettings *userSettings()
{
QSettings *settings = createUserSettings();
const QString fromVariant = QLatin1String(Core::Constants::IDE_COPY_SETTINGS_FROM_VARIANT_STR);
if (fromVariant.isEmpty())
return settings;
// Copy old settings to new ones:
QFileInfo pathFi = QFileInfo(settings->fileName());
if (pathFi.exists()) // already copied.
return settings;
QDir destDir = pathFi.absolutePath();
if (!destDir.exists())
destDir.mkpath(pathFi.absolutePath());
QDir srcDir = destDir;
srcDir.cdUp();
if (!srcDir.cd(fromVariant))
return settings;
if (srcDir == destDir) // Nothing to copy and no settings yet
return settings;
QStringList entries = srcDir.entryList();
foreach (const QString &file, entries) {
const QString lowerFile = file.toLower();
if (lowerFile.startsWith(QLatin1String("profiles.xml"))
|| lowerFile.startsWith(QLatin1String("toolchains.xml"))
|| lowerFile.startsWith(QLatin1String("qtversion.xml"))
|| lowerFile.startsWith(QLatin1String("devices.xml"))
|| lowerFile.startsWith(QLatin1String("qtcreator.")))
QFile::copy(srcDir.absoluteFilePath(file), destDir.absoluteFilePath(file));
if (file == QLatin1String("qtcreator"))
copyRecursively(srcDir.absoluteFilePath(file), destDir.absoluteFilePath(file));
}
// Make sure to use the copied settings:
delete settings;
return createUserSettings();
}
#ifdef Q_OS_MAC
# define SHARE_PATH "/../Resources"
#else
@@ -258,9 +334,8 @@ int main(int argc, char **argv)
QCoreApplication::applicationDirPath() + QLatin1String(SHARE_PATH));
QSettings::setDefaultFormat(QSettings::IniFormat);
// plugin manager takes control of this settings object
QSettings *settings = new QSettings(QSettings::IniFormat, QSettings::UserScope,
QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR),
QLatin1String("QtCreator"));
QSettings *settings = userSettings();
QSettings *globalSettings = new QSettings(QSettings::IniFormat, QSettings::SystemScope,
QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR),
QLatin1String("QtCreator"));

View File

@@ -56,7 +56,7 @@
in a library that matches the \c name attribute given in their
XML description. The IPlugin implementation must be exported and
made known to Qt's plugin system, see the Qt Documentation on the
\l{http://doc.qt.nokia.com/4.7/qtplugin.html#Q_EXPORT_PLUGIN2}
\l{http://qt-project.org/doc/qt-4.8/qtplugin.html#Q_EXPORT_PLUGIN2}
{Q_EXPORT_PLUGIN2 macro}.
After the plugins' XML files have been read, and dependencies have been

View File

@@ -399,6 +399,7 @@ Parser::Parser(Engine *engine):
state_stack(0),
location_stack(0),
string_stack(0),
program(0),
first_token(0),
last_token(0)
{
@@ -821,6 +822,7 @@ UiParameterList: UiParameterList T_COMMA UiPropertyType JsIdentifier ;
/.
case $rule_number: {
AST::UiParameterList *node = new (pool) AST::UiParameterList(sym(1).UiParameterList, stringRef(3), stringRef(4));
node->propertyTypeToken = loc(3);
node->commaToken = loc(2);
node->identifierToken = loc(4);
sym(1).Node = node;
@@ -2885,7 +2887,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
yylloc.startColumn += yylloc.length;
yylloc.length = 0;
//const QString msg = qApp->translate("QmlParser", "Missing `;'");
//const QString msg = qApp->translate("QQmlParser", "Missing `;'");
//diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg));
first_token = &token_buffer[0];
@@ -2915,9 +2917,9 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
QString msg;
int token = token_buffer[0].token;
if (token < 0 || token >= TERMINAL_COUNT)
msg = qApp->translate("QmlParser", "Syntax error");
msg = qApp->translate("QQmlParser", "Syntax error");
else
msg = qApp->translate("QmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token]));
msg = qApp->translate("QQmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token]));
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
action = errorState;
@@ -2945,7 +2947,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) {
int a = t_action(errorState, *tk);
if (a > 0 && t_action(a, yytoken)) {
const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk]));
const QString msg = qApp->translate("QQmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk]));
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
yytoken = *tk;
@@ -2969,7 +2971,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
int a = t_action(errorState, tk);
if (a > 0 && t_action(a, yytoken)) {
const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk]));
const QString msg = qApp->translate("QQmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk]));
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
yytoken = tk;
@@ -2982,7 +2984,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
}
}
const QString msg = qApp->translate("QmlParser", "Syntax error");
const QString msg = qApp->translate("QQmlParser", "Syntax error");
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
}

View File

@@ -825,6 +825,13 @@ void UiObjectInitializer::accept0(Visitor *visitor)
visitor->endVisit(this);
}
void UiParameterList::accept0(Visitor *visitor)
{
if (visitor->visit(this)) {
}
visitor->endVisit(this);
}
void UiObjectBinding::accept0(Visitor *visitor)
{
if (visitor->visit(this)) {

View File

@@ -2390,7 +2390,7 @@ public:
previous->next = this;
}
virtual void accept0(Visitor *) {}
virtual void accept0(Visitor *);
virtual SourceLocation firstSourceLocation() const
{ return propertyTypeToken; }

View File

@@ -156,6 +156,7 @@ class UiProgram;
class UiImportList;
class UiImport;
class UiPublicMember;
class UiParameterList;
class UiObjectDefinition;
class UiObjectInitializer;
class UiObjectBinding;

View File

@@ -68,6 +68,7 @@ public:
virtual bool visit(UiObjectBinding *) { return true; }
virtual bool visit(UiScriptBinding *) { return true; }
virtual bool visit(UiArrayBinding *) { return true; }
virtual bool visit(UiParameterList *) { return true; }
virtual bool visit(UiObjectMemberList *) { return true; }
virtual bool visit(UiArrayMemberList *) { return true; }
virtual bool visit(UiQualifiedId *) { return true; }
@@ -82,6 +83,7 @@ public:
virtual void endVisit(UiObjectBinding *) {}
virtual void endVisit(UiScriptBinding *) {}
virtual void endVisit(UiArrayBinding *) {}
virtual void endVisit(UiParameterList *) {}
virtual void endVisit(UiObjectMemberList *) {}
virtual void endVisit(UiArrayMemberList *) {}
virtual void endVisit(UiQualifiedId *) {}

View File

@@ -387,6 +387,7 @@ case 47: {
case 48: {
AST::UiParameterList *node = new (pool) AST::UiParameterList(sym(1).UiParameterList, stringRef(3), stringRef(4));
node->propertyTypeToken = loc(3);
node->commaToken = loc(2);
node->identifierToken = loc(4);
sym(1).Node = node;

View File

@@ -544,6 +544,18 @@ protected:
return false;
}
virtual bool visit(UiParameterList *list)
{
for (UiParameterList *it = list; it; it = it->next) {
out(it->propertyTypeToken);
out(" ");
out(it->identifierToken);
if (it->next)
out(", ", it->commaToken);
}
return false;
}
virtual bool visit(UiPublicMember *ast)
{
if (ast->type == UiPublicMember::Property) {
@@ -570,7 +582,11 @@ protected:
} else { // signal
out("signal ");
out(ast->identifierToken);
accept(ast->parameters);
if (ast->parameters) {
out("(");
accept(ast->parameters);
out(")");
}
}
return false;
}

View File

@@ -135,8 +135,8 @@ bool FileUtils::copyRecursively(const FileName &srcFilePath, const FileName &tgt
if (error) {
*error = QCoreApplication::translate("Utils::FileUtils", "Failed to create directory '%1'.")
.arg(tgtFilePath.toUserOutput());
return false;
}
return false;
}
QDir sourceDir(srcFilePath.toString());
QStringList fileNames = sourceDir.entryList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot

View File

@@ -4,7 +4,7 @@ import "../../qbs/defaults.js" as Defaults
Product {
type: ["dynamiclibrary", "pluginSpec"]
property string provider: 'Nokia'
property string provider: 'QtProject'
property var pluginspecreplacements
destination: "lib/qtcreator/plugins/" + provider
targetName: {

View File

@@ -1,32 +1,31 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Hugues Delorme
** Contact: http://www.qt-project.org/legal
**
** Contact: http://www.qt-project.org/
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** 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.
** Alternatively, 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, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** rights. These rights are described in the Digia 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.
**
**
**************************************************************************/
****************************************************************************/
#include "clonewizard.h"
#include "clonewizardpage.h"

View File

@@ -1,32 +1,31 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Hugues Delorme
** Contact: http://www.qt-project.org/legal
**
** Contact: http://www.qt-project.org/
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** 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.
** Alternatively, 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, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** rights. These rights are described in the Digia 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.
**
**
**************************************************************************/
****************************************************************************/
#ifndef CLONEWIZARD_H
#define CLONEWIZARD_H

View File

@@ -1,32 +1,31 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Hugues Delorme
** Contact: http://www.qt-project.org/legal
**
** Contact: http://www.qt-project.org/
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** 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.
** Alternatively, 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, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** rights. These rights are described in the Digia 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.
**
**
**************************************************************************/
****************************************************************************/
#include "clonewizardpage.h"
#include "cloneoptionspanel.h"

View File

@@ -1,32 +1,31 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Hugues Delorme
** Contact: http://www.qt-project.org/legal
**
** Contact: http://www.qt-project.org/
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** 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.
** Alternatively, 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, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** rights. These rights are described in the Digia 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.
**
**
**************************************************************************/
****************************************************************************/
#ifndef CLONEWIZARDPAGE_H
#define CLONEWIZARDPAGE_H

View File

@@ -1,32 +1,31 @@
/****************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Konstantin Tokarev.
** Contact: http://www.qt-project.org/legal
**
** Contact: http://www.qt-project.org/
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** 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.
** Alternatively, 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, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** rights. These rights are described in the Digia 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.
**
**
**************************************************************************/
****************************************************************************/
#include "commandbutton.h"

View File

@@ -1,32 +1,31 @@
/****************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Konstantin Tokarev.
** Contact: http://www.qt-project.org/legal
**
** Contact: http://www.qt-project.org/
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** 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.
** Alternatively, 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, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** rights. These rights are described in the Digia 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.
**
**
**************************************************************************/
****************************************************************************/
#ifndef COMMANDBUTTON_H
#define COMMANDBUTTON_H

View File

@@ -13,8 +13,8 @@
<file>images/filesave.png</file>
<file>images/find.png</file>
<file>images/findnext.png</file>
<file>images/logo/128/qtcreator.png</file>
<file>images/logo/32/qtcreator.png</file>
<file>images/logo/128/QtProject-qtcreator.png</file>
<file>images/logo/32/QtProject-qtcreator.png</file>
<file>images/inputfield.png</file>
<file>images/inputfield_disabled.png</file>
<file>images/linkicon.png</file>

View File

@@ -205,8 +205,8 @@ const char ICON_CLOSE_SPLIT_LEFT[] = ":/core/images/splitbutton_closeleft.png"
const char ICON_CLOSE_SPLIT_RIGHT[] = ":/core/images/splitbutton_closeright.png";
const char ICON_FILTER[] = ":/core/images/filtericon.png";
const char ICON_LINK[] = ":/core/images/linkicon.png";
const char ICON_QTLOGO_32[] = ":/core/images/logo/32/qtcreator.png";
const char ICON_QTLOGO_128[] = ":/core/images/logo/128/qtcreator.png";
const char ICON_QTLOGO_32[] = ":/core/images/logo/32/QtProject-qtcreator.png";
const char ICON_QTLOGO_128[] = ":/core/images/logo/128/QtProject-qtcreator.png";
const char WIZARD_CATEGORY_QT[] = "R.Qt";
const char WIZARD_TR_CATEGORY_QT[] = QT_TRANSLATE_NOOP("Core", "Qt");

View File

@@ -236,7 +236,7 @@ else:unix {
IMAGE_SIZE_LIST = 16 24 32 48 64 128 256 512
for(imagesize, IMAGE_SIZE_LIST) {
eval(image$${imagesize}.files = images/logo/$${imagesize}/qtcreator.png)
eval(image$${imagesize}.files = images/logo/$${imagesize}/QtProject-qtcreator.png)
eval(image$${imagesize}.path = $$QTC_PREFIX/share/icons/hicolor/$${imagesize}x$${imagesize}/apps)
INSTALLS += image$${imagesize}
}

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 681 B

After

Width:  |  Height:  |  Size: 681 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -8,48 +8,48 @@ Product {
Group {
qbs.installDir: "share/icons/hicolor/16x16/apps"
fileTags: ["install"]
files: ["16/qtcreator.png"]
files: ["16/QtProject-qtcreator.png"]
}
Group {
qbs.installDir: "share/icons/hicolor/24x24/apps"
fileTags: ["install"]
files: ["24/qtcreator.png"]
files: ["24/QtProject-qtcreator.png"]
}
Group {
qbs.installDir: "share/icons/hicolor/32x32/apps"
fileTags: ["install"]
files: ["32/qtcreator.png"]
files: ["32/QtProject-qtcreator.png"]
}
Group {
qbs.installDir: "share/icons/hicolor/48x48/apps"
fileTags: ["install"]
files: ["48/qtcreator.png"]
files: ["48/QtProject-qtcreator.png"]
}
Group {
qbs.installDir: "share/icons/hicolor/64x64/apps"
fileTags: ["install"]
files: ["64/qtcreator.png"]
files: ["64/QtProject-qtcreator.png"]
}
Group {
qbs.installDir: "share/icons/hicolor/128x128/apps"
fileTags: ["install"]
files: ["128/qtcreator.png"]
files: ["128/QtProject-qtcreator.png"]
}
Group {
qbs.installDir: "share/icons/hicolor/256x256/apps"
fileTags: ["install"]
files: ["256/qtcreator.png"]
files: ["256/QtProject-qtcreator.png"]
}
Group {
qbs.installDir: "share/icons/hicolor/512x512/apps"
fileTags: ["install"]
files: ["512/qtcreator.png"]
files: ["512/QtProject-qtcreator.png"]
}
}

View File

@@ -348,9 +348,11 @@ bool CppPreprocessor::includeFile(const QString &absoluteFilePath, QString *resu
QFile file(absoluteFilePath);
if (file.open(QFile::ReadOnly | QFile::Text)) {
m_included.insert(absoluteFilePath);
QTextCodec *defaultCodec = Core::EditorManager::instance()->defaultTextCodec();
QTextStream stream(&file);
const QString contents = stream.readAll();
*result = contents.toUtf8();
stream.setCodec(defaultCodec);
if (result)
*result = stream.readAll();
file.close();
return true;
}

View File

@@ -281,7 +281,7 @@ QList<GitoriousRepository> GitoriousProjectReader::readRepositories(QXmlStreamRe
int defaultType = -1;
// The "mainlines"/"clones" elements are not used in the
// Nokia setup, handle them optionally.
// QtProject setup, handle them optionally.
while (!reader.atEnd()) {
reader.readNext();

View File

@@ -51,9 +51,9 @@ struct GitoriousRepository
enum Type {
MainLineRepository,
CloneRepository,
BaselineRepository, // Nokia extension
SharedRepository, // Nokia extension
PersonalRepository // Nokia extension
BaselineRepository, // QtProject extension
SharedRepository, // QtProject extension
PersonalRepository // QtProject extension
};
GitoriousRepository();

View File

@@ -4,9 +4,11 @@ TARGET = Help
QT += network
greaterThan(QT_MAJOR_VERSION, 4) {
QT += printsupport help
DEFINES += QT_NO_WEBKIT
!isEmpty(QT.webkit.name): QT += webkit
else: DEFINES += QT_NO_WEBKIT
} else {
CONFIG += help
CONFIG += help
contains(QT_CONFIG, webkit): QT += webkit
}
INCLUDEPATH += $$PWD
@@ -68,7 +70,3 @@ FORMS += docsettingspage.ui \
RESOURCES += help.qrc
include(../../shared/help/help.pri)
contains(QT_CONFIG, webkit) {
QT += webkit
}

View File

@@ -38,16 +38,17 @@ using namespace Utils;
namespace ProjectExplorer {
DeployableFile::DeployableFile()
: m_type(TypeNormal)
{
}
DeployableFile::DeployableFile(const QString &localFilePath, const QString &remoteDir)
: m_localFilePath(FileName::fromUserInput(localFilePath)), m_remoteDir(remoteDir)
DeployableFile::DeployableFile(const QString &localFilePath, const QString &remoteDir, Type type)
: m_localFilePath(FileName::fromUserInput(localFilePath)), m_remoteDir(remoteDir), m_type(type)
{
}
DeployableFile::DeployableFile(const FileName &localFilePath, const QString &remoteDir)
: m_localFilePath(localFilePath), m_remoteDir(remoteDir)
DeployableFile::DeployableFile(const FileName &localFilePath, const QString &remoteDir, Type type)
: m_localFilePath(localFilePath), m_remoteDir(remoteDir), m_type(type)
{
}
@@ -62,6 +63,11 @@ bool DeployableFile::isValid() const
return !m_localFilePath.toString().isEmpty() && !m_remoteDir.isEmpty();
}
bool DeployableFile::isExecutable() const
{
return m_type == TypeExecutable;
}
uint qHash(const DeployableFile &d)
{
return qHash(qMakePair(d.localFilePath().toString(), d.remoteDirectory()));

View File

@@ -41,9 +41,17 @@ namespace ProjectExplorer {
class PROJECTEXPLORER_EXPORT DeployableFile
{
public:
enum Type
{
TypeNormal,
TypeExecutable
};
DeployableFile();
DeployableFile(const QString &m_localFilePath, const QString &m_remoteDir);
DeployableFile(const Utils::FileName &localFilePath, const QString &remoteDir);
DeployableFile(const QString &m_localFilePath, const QString &m_remoteDir,
Type type = TypeNormal);
DeployableFile(const Utils::FileName &localFilePath, const QString &remoteDir,
Type type = TypeNormal);
Utils::FileName localFilePath() const { return m_localFilePath; }
QString remoteDirectory() const { return m_remoteDir; }
@@ -51,9 +59,12 @@ public:
bool isValid() const;
bool isExecutable() const;
private:
Utils::FileName m_localFilePath;
QString m_remoteDir;
Type m_type;
};

View File

@@ -48,9 +48,10 @@ public:
m_files << file;
}
void addFile(const QString &localFilePath, const QString &remoteDirectory)
void addFile(const QString &localFilePath, const QString &remoteDirectory,
DeployableFile::Type type = DeployableFile::TypeNormal)
{
addFile(DeployableFile(localFilePath, remoteDirectory));
addFile(DeployableFile(localFilePath, remoteDirectory, type));
}
int fileCount() const { return m_files.count(); }

View File

@@ -164,7 +164,8 @@ QList<Task> ToolChainKitInformation::validate(Kit *k) const
{
QList<Task> result;
if (!toolChain(k)) {
qWarning() << "Tool chain is no longer known, removing from kit %1." << k->displayName();
qWarning("Tool chain is no longer known, removing from kit \"%s\".",
qPrintable(k->displayName()));
setToolChain(k, 0); // make sure to clear out no longer known tool chains
result << Task(Task::Error, ToolChainKitInformation::msgNoToolChainInTarget(),
Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));

View File

@@ -154,26 +154,25 @@ void KitManager::restoreKits()
// read all kits from SDK
QFileInfo systemSettingsFile(Core::ICore::settings(QSettings::SystemScope)->fileName());
KitList system = restoreKits(Utils::FileName::fromString(systemSettingsFile.absolutePath() + QLatin1String(KIT_FILENAME)));
QList<Kit *> readKits = system.kits;
// make sure we mark these as autodetected!
foreach (Kit *k, readKits)
k->setAutoDetected(true);
QFileInfo kitFile(systemSettingsFile.absolutePath(), QLatin1String(KIT_FILENAME));
if (kitFile.exists()) {
KitList system = restoreKits(Utils::FileName(kitFile));
// make sure we mark these as autodetected!
foreach (Kit *k, system.kits)
k->setAutoDetected(true);
kitsToRegister = readKits; // SDK kits are always considered to be up-to-date, so no need to
// recheck them.
// SDK kits are always considered to be up-to-date, so no need to recheck them.
kitsToRegister = system.kits;
}
// read all kit chains from user file
KitList userKits = restoreKits(settingsFileName());
readKits = userKits.kits;
foreach (Kit *k, readKits) {
foreach (Kit *k, userKits.kits) {
if (k->isAutoDetected())
kitsToCheck.append(k);
else
kitsToRegister.append(k);
}
readKits.clear();
// Then auto create kits:
QList<Kit *> detectedKits;
@@ -285,7 +284,7 @@ KitManager::KitList KitManager::restoreKits(const Utils::FileName &fileName)
PersistentSettingsReader reader;
if (!reader.load(fileName)) {
qWarning("Warning: Failed to read \"%s\", can not restore kits!", qPrintable(fileName.toUserOutput()));
qWarning("Warning: Failed to read \"%s\", cannot restore kits!", qPrintable(fileName.toUserOutput()));
return result;
}
QVariantMap data = reader.restoreValues();
@@ -293,7 +292,7 @@ KitManager::KitList KitManager::restoreKits(const Utils::FileName &fileName)
// Check version:
int version = data.value(QLatin1String(KIT_FILE_VERSION_KEY), 0).toInt();
if (version < 1) {
qWarning("Warning: Kit file version %d not supported, can not restore kits!", version);
qWarning("Warning: Kit file version %d not supported, cannot restore kits!", version);
return result;
}

View File

@@ -1471,7 +1471,8 @@ void Qt4Project::collectData(const Qt4ProFileNode *node, DeploymentData &deploym
switch (node->projectType()) {
case ApplicationTemplate:
if (!installsList.targetPath.isEmpty())
deploymentData.addFile(node->targetInformation().executable, installsList.targetPath);
deploymentData.addFile(node->targetInformation().executable, installsList.targetPath,
DeployableFile::TypeExecutable);
break;
case LibraryTemplate:
collectLibraryData(node, deploymentData);

View File

@@ -61,6 +61,7 @@ public:
SftpChannel::Ptr uploader;
SshRemoteProcess::Ptr mkdirProc;
SshRemoteProcess::Ptr lnProc;
SshRemoteProcess::Ptr chmodProc;
QList<DeployableFile> deployableFiles;
};
@@ -174,13 +175,19 @@ void GenericDirectUploadService::handleUploadFinished(QSsh::SftpJobId jobId, con
} else {
saveDeploymentTimeStamp(df);
// Terrible hack for Windows.
if (df.remoteDirectory().contains(QLatin1String("bin"))) {
// This is done for Windows.
if (df.isExecutable()) {
const QString command = QLatin1String("chmod a+x ") + df.remoteFilePath();
connection()->createRemoteProcess(command.toUtf8())->start();
d->chmodProc = connection()->createRemoteProcess(command.toUtf8());
connect(d->chmodProc.data(), SIGNAL(closed(int)), SLOT(handleChmodFinished(int)));
connect(d->chmodProc.data(), SIGNAL(readyReadStandardOutput()),
SLOT(handleStdOutData()));
connect(d->chmodProc.data(), SIGNAL(readyReadStandardError()),
SLOT(handleStdErrData()));
d->chmodProc->start();
} else {
uploadNextFile();
}
uploadNextFile();
}
}
@@ -206,6 +213,25 @@ void GenericDirectUploadService::handleLnFinished(int exitStatus)
}
}
void GenericDirectUploadService::handleChmodFinished(int exitStatus)
{
QTC_ASSERT(d->state == Uploading, setFinished(); return);
if (d->stopRequested) {
setFinished();
handleDeploymentDone();
return;
}
if (exitStatus != SshRemoteProcess::NormalExit || d->chmodProc->exitCode() != 0) {
emit errorMessage(tr("Failed to set executable flag."));
setFinished();
handleDeploymentDone();
return;
}
uploadNextFile();
}
void GenericDirectUploadService::handleMkdirFinished(int exitStatus)
{
QTC_ASSERT(d->state == Uploading, setFinished(); return);

View File

@@ -68,6 +68,7 @@ private slots:
void handleUploadFinished(QSsh::SftpJobId jobId, const QString &errorMsg);
void handleMkdirFinished(int exitStatus);
void handleLnFinished(int exitStatus);
void handleChmodFinished(int exitStatus);
void handleStdOutData();
void handleStdErrData();

View File

@@ -11,7 +11,7 @@ GNU Lesser General Public License Usage
Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. 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.
</license>
<description>Adds pane that lists all TODO, FIXME, etc. entries in comments.</description>
<url>http://qt.nokia.com/</url>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -411,7 +411,7 @@ QAction *ChangeTextCursorHandler::createCopyRevisionAction(const QString &change
}
/*! \class UrlTextCursorHandler
* \brief Provides a handler for URL like http://www.nokia.com
* \brief Provides a handler for URL like http://qt-project.org/
*
* The URL pattern can be redefined in sub-classes with setUrlPattern(), by default the pattern
* works for hyper-text URL

View File

@@ -4,9 +4,9 @@ include(../qtcreator.pri)
isEmpty(PRECOMPILED_HEADER):PRECOMPILED_HEADER = $$PWD/shared/qtcreator_gui_pch.h
isEmpty(PROVIDER) {
PROVIDER = Nokia
PROVIDER = QtProject
} else {
LIBS += -L$$IDE_PLUGIN_PATH/Nokia
LIBS += -L$$IDE_PLUGIN_PATH/QtProject
}
isEmpty(USE_USER_DESTDIR) {
@@ -24,7 +24,7 @@ isEmpty(USE_USER_DESTDIR) {
DESTDIRBASE = "$$(XDG_DATA_HOME)"
isEmpty(DESTDIRBASE):DESTDIRBASE = "$$(HOME)/.local/share/data"
}
DESTDIR = "$$DESTDIRBASE/Nokia/$$DESTDIRAPPNAME/plugins/$$QTCREATOR_VERSION/$$PROVIDER"
DESTDIR = "$$DESTDIRBASE/QtProject/$$DESTDIRAPPNAME/plugins/$$QTCREATOR_VERSION/$$PROVIDER"
}
LIBS += -L$$DESTDIR

View File

@@ -38,7 +38,6 @@
#include <QTextStream>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>

View File

@@ -6,28 +6,36 @@ import re;
# line can be a regex - but if so, remember to set isRegex to True
# the function returns True if this went fine, False on error
def placeCursorToLine(editor, line, isRegex=False):
cursor = editor.textCursor()
def getEditor():
return waitForObject(editor)
isDarwin = platform.system() == 'Darwin'
if not isinstance(editor, (str, unicode)):
editor = objectMap.realName(editor)
oldPosition = 0
cursor.setPosition(oldPosition)
editor.setTextCursor(cursor)
if isDarwin:
type(getEditor(), "<Home>")
else:
type(getEditor(), "<Ctrl+Home>")
found = False
if isRegex:
regex = re.compile(line)
while not found:
currentLine = str(lineUnderCursor(editor)).strip()
currentLine = str(lineUnderCursor(getEditor())).strip()
found = isRegex and regex.match(currentLine) or not isRegex and currentLine == line
if not found:
type(editor, "<Down>")
newPosition = editor.textCursor().position()
type(getEditor(), "<Down>")
newPosition = getEditor().textCursor().position()
if oldPosition == newPosition:
break
oldPosition = newPosition
if not found:
test.fatal("Couldn't find line matching\n\n%s\n\nLeaving test..." % line)
return False
cursor = editor.textCursor()
cursor.movePosition(QTextCursor.EndOfLine, QTextCursor.MoveAnchor)
editor.setTextCursor(cursor)
if isDarwin:
type(getEditor(), "<Ctrl+Right>")
else:
type(getEditor(), "<End>")
return True
# this function returns True if a QMenu is

View File

@@ -291,30 +291,22 @@ def getConfiguredKits():
def __retrieveQtVersionName__(target, version):
treeWidget = waitForObject(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget")
return treeWidget.currentItem().text(0)
targetQtVersionNames = {}
# end of internal function for iterateQtVersions
def __setQtVersionForKit__(kit, kitName, kitsQtVersionName):
treeView = waitForObject(":Kits_QTreeView")
clickItem(treeView, kit, 5, 5, 0, Qt.LeftButton)
qtVersionStr = str(waitForObject(":Kits_QtVersion_QComboBox").currentText)
kitsQtVersionName[kitName] = qtVersionStr
# end of internal function for iterate kits
kitsWithQtVersionName = {}
result = {}
targetsQtVersions, qtVersionNames = iterateQtVersions(True, __retrieveQtVersionName__)
clickTab(waitForObject(":Options.qt_tabwidget_tabbar_QTabBar"), "Kits")
treeView = waitForObject(":Kits_QTreeView")
model = treeView.model()
test.compare(model.rowCount(), 2, "Verifying expected target section count")
autoDetected = model.index(0, 0)
test.compare(autoDetected.data().toString(), "Auto-detected",
"Verifying label for target section")
manual = model.index(1, 0)
test.compare(manual.data().toString(), "Manual", "Verifying label for target section")
for section in [autoDetected, manual]:
for index in [section.child(i, 0) for i in range(model.rowCount(section))]:
targetName = str(index.data().toString())
if (targetName.endswith(" (default)")):
targetName = targetName.rsplit(" (default)", 1)[0]
item = ".".join([str(section.data().toString()),
str(index.data().toString()).replace(".", "\\.")])
clickItem(treeView, item, 5, 5, 0, Qt.LeftButton)
qtVersionStr = str(waitForObject(":Kits_QtVersion_QComboBox").currentText)
targetQtVersionNames[targetName] = qtVersionStr
# collect kits and their Qt versions
targetsQtVersions, qtVersionNames = iterateQtVersions(True, False, __retrieveQtVersionName__)
# update collected Qt versions with their configured device and version
iterateKits(True, True, __setQtVersionForKit__, kitsWithQtVersionName)
# merge defined target names with their configured Qt versions and devices
for kit,qtVersion in targetQtVersionNames.iteritems():
for kit,qtVersion in kitsWithQtVersionName.iteritems():
if qtVersion in qtVersionNames:
result[kit] = targetsQtVersions[qtVersionNames.index(qtVersion)].items()[0]
else:
@@ -326,7 +318,8 @@ def getConfiguredKits():
targetInfo = result[targetName]
if targetInfo[0] == "Maemo":
result.update({targetName:
(QtQuickConstants.getStringForTarget(QtQuickConstants.Targets.MAEMO5), targetInfo[1])})
(QtQuickConstants.getStringForTarget(QtQuickConstants.Targets.MAEMO5),
targetInfo[1])})
test.log("Configured kits: %s" % str(result))
return result
@@ -350,15 +343,22 @@ def regexVerify(text, expectedTexts):
return True
return False
def checkDebuggingLibrary(targVersion, targets):
def checkDebuggingLibrary(kitIDs):
def __getQtVersionForKit__(kit, kitName):
treeView = waitForObject(":Kits_QTreeView")
clickItem(treeView, kit, 5, 5, 0, Qt.LeftButton)
return str(waitForObject(":Kits_QtVersion_QComboBox").currentText)
# end of internal function for iterate kits
# internal function to execute while iterating Qt versions
def __checkDebugLibsInternalFunc__(target, version, targVersion, targStrings):
def __checkDebugLibsInternalFunc__(target, version, kitStrings):
built = failed = 0
container = ("container=':qt_tabwidget_stackedwidget.QtSupport__Internal__"
"QtVersionManager_QtSupport::Internal::QtOptionsPageWidget'")
buildLogWindow = ("window={name='QtSupport__Internal__ShowBuildLog' type='QDialog' "
"visible='1' windowTitle?='Debugging Helper Build Log*'}")
if target in targStrings and version == targVersion:
treeWidget = waitForObject(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget")
if str(treeWidget.currentItem().text(0)) in kitStrings.values():
detailsButton = waitForObject("{%s type='Utils::DetailsButton' text='Details' "
"visible='1' unnamed='1' occurrence='2'}" % container)
ensureChecked(detailsButton)
@@ -380,10 +380,12 @@ def checkDebuggingLibrary(targVersion, targets):
built += 1
ensureChecked(detailsButton, False)
return (built, failed)
# end of internal function
tv, builtAndFailedList = iterateQtVersions(False, __checkDebugLibsInternalFunc__, targVersion,
QtQuickConstants.getTargetsAsStrings(targets))
# end of internal function for iterateQtVersions
kits, qtv = iterateKits(True, False, __getQtVersionForKit__)
qtVersionsOfKits = zip(kits, qtv)
wantedKits = QtQuickConstants.getTargetsAsStrings(kitIDs)
kitsQtV = dict([i for i in qtVersionsOfKits if i[0] in wantedKits])
tv, builtAndFailedList = iterateQtVersions(False, True, __checkDebugLibsInternalFunc__, kitsQtV)
built = failed = 0
for current in builtAndFailedList:
if current[0]:
@@ -394,11 +396,17 @@ def checkDebuggingLibrary(targVersion, targets):
test.fail("%d of %d GDB Helper compilations failed." % (failed, failed+built))
else:
test.passes("%d GDB Helper found compiled or successfully built." % built)
if built == len(kitIDs):
test.log("Function executed for all given kits.")
else:
test.fatal("Something's wrong - function has skipped some kits.")
return failed == 0
# function that opens Options Dialog and parses the configured Qt versions
# param keepOptionsOpen set to True if the Options dialog should stay open when
# leaving this function
# param alreadyOnOptionsDialog set to True if you already have opened the Options Dialog
# (if False this function will open it via the MenuBar -> Tools -> Options...)
# param additionalFunction pass a function or name of a defined function to execute
# for each correctly configured item on the list of Qt versions
# (Qt versions having no assigned toolchain, failing qmake,... will be skipped)
@@ -414,10 +422,12 @@ def checkDebuggingLibrary(targVersion, targets):
# result, additionalResult = _iterateQtVersions(...)
# where additionalResult is the result of all executions of additionalFunction which
# means it is a list of results.
def iterateQtVersions(keepOptionsOpen=False, additionalFunction=None, *argsForAdditionalFunc):
def iterateQtVersions(keepOptionsOpen=False, alreadyOnOptionsDialog=False,
additionalFunction=None, *argsForAdditionalFunc):
result = []
additionalResult = []
invokeMenuItem("Tools", "Options...")
if not alreadyOnOptionsDialog:
invokeMenuItem("Tools", "Options...")
waitForObjectItem(":Options_QListView", "Build & Run")
clickItem(":Options_QListView", "Build & Run", 14, 15, 0, Qt.LeftButton)
clickTab(waitForObject(":Options.qt_tabwidget_tabbar_QTabBar"), "Qt Versions")
@@ -457,6 +467,70 @@ def iterateQtVersions(keepOptionsOpen=False, additionalFunction=None, *argsForAd
else:
return result
# function that opens Options Dialog (if necessary) and parses the configured Kits
# param keepOptionsOpen set to True if the Options dialog should stay open when
# leaving this function
# param alreadyOnOptionsDialog set to True if you already have opened the Options Dialog
# (if False this functions will open it via the MenuBar -> Tools -> Options...)
# param additionalFunction pass a function or name of a defined function to execute
# for each configured item on the list of Kits
# this function must take at least 2 parameters - the first is the item (QModelIndex)
# of the current Kit (if you need to click on it) and the second the Kit name itself
# param argsForAdditionalFunc you can specify as much parameters as you want to pass
# to additionalFunction from the outside
# the function returns a list of Kit names if used without an additional function
# WATCH OUT! if you're using the additionalFunction parameter - this function will
# return the list mentioned above as well as the returned value(s) from
# additionalFunction. You MUST call this function like
# result, additionalResult = _iterateQtVersions(...)
# where additionalResult is the result of all executions of additionalFunction which
# means it is a list of results.
def iterateKits(keepOptionsOpen=False, alreadyOnOptionsDialog=False,
additionalFunction=None, *argsForAdditionalFunc):
result = []
additionalResult = []
if not alreadyOnOptionsDialog:
invokeMenuItem("Tools", "Options...")
waitForObjectItem(":Options_QListView", "Build & Run")
clickItem(":Options_QListView", "Build & Run", 14, 15, 0, Qt.LeftButton)
clickTab(waitForObject(":Options.qt_tabwidget_tabbar_QTabBar"), "Kits")
treeView = waitForObject(":Kits_QTreeView")
model = treeView.model()
test.compare(model.rowCount(), 2, "Verifying expected target section count")
autoDetected = model.index(0, 0)
test.compare(autoDetected.data().toString(), "Auto-detected",
"Verifying label for target section")
manual = model.index(1, 0)
test.compare(manual.data().toString(), "Manual", "Verifying label for target section")
for section in [autoDetected, manual]:
for index in [section.child(i, 0) for i in range(model.rowCount(section))]:
kitName = str(index.data().toString())
if (kitName.endswith(" (default)")):
kitName = kitName.rsplit(" (default)", 1)[0]
result.append(kitName)
item = ".".join([str(section.data().toString()),
str(index.data().toString()).replace(".", "\\.")])
if additionalFunction:
try:
if isinstance(additionalFunction, (str, unicode)):
currResult = globals()[additionalFunction](item, kitName, *argsForAdditionalFunc)
else:
currResult = additionalFunction(item, kitName, *argsForAdditionalFunc)
except:
import sys
t,v,tb = sys.exc_info()
currResult = None
test.fatal("Function to additionally execute on Options Dialog could not be "
"found or an exception occured while executing it.", "%s(%s)" %
(str(t), str(v)))
additionalResult.append(currResult)
if not keepOptionsOpen:
clickButton(waitForObject(":Options.Cancel_QPushButton"))
if additionalFunction:
return result, additionalResult
else:
return result
# set "Always Start Full Help" in "Tools" -> "Options..." -> "Help" -> "General"
def setAlwaysStartFullHelp():
invokeMenuItem("Tools", "Options...")

View File

@@ -5,7 +5,7 @@ workingDir = None
def main():
global workingDir
startApplication("qtcreator" + SettingsPath)
if not checkDebuggingLibrary("4.7.4", [QtQuickConstants.Targets.DESKTOP_474_GCC]):
if not checkDebuggingLibrary([QtQuickConstants.Targets.DESKTOP_474_GCC]):
test.fatal("Error while checking debugging libraries - leaving this test.")
invokeMenuItem("File", "Exit")
return