Commit a55d4754 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/2.6'

Conflicts:
	qtcreator.qbp
	src/plugins/qtsupport/baseqtversion.cpp
	src/tools/tools.pro

Change-Id: I43c391328ae747b3dc566f9db2384fedc1a6d0a5
parents 996122b7 471f44aa
......@@ -10,12 +10,12 @@ Windows 7, Windows XP SP2, Windows Vista
(K)Ubuntu Linux 8.04 (32-bit and 64-bit) or later
Mac OS 10.5 or later
Building the sources requires Qt 4.7.4 or later.
Building the sources requires Qt 4.8.0 or later.
Compiling Qt Creator
====================
Prerequisites:
* Qt 4.7.4
* Qt 4.8.0
* On Windows:
- ActiveState Active Perl
- MinGW 4.4 or later, Visual Studio 2008 or later
......@@ -36,7 +36,7 @@ Compiling Qt Quick Designer
---------------------------
Qt Quick Designer (QmlDesigner plugin) depends on "private" headers from Qt
4.7.4, specifically from the QtDeclarative module. These private headers always
4.8.0, specifically from the QtDeclarative module. These private headers always
end with an "_p.h". Nokia does not promise to keep these files or APIs binary
or source compatible between releases. This means that when compiled, the
plugin has a dependency to the exact Qt version it was compiled with. Running
......
......@@ -9,7 +9,7 @@ QMAKE_STRIP =
QMAKE_CLEAN = qtcreator.sh
target.path = /bin
target.path = $$QTC_PREFIX/bin
INSTALLS += target
OTHER_FILES = $$PWD/qtcreator.sh
......@@ -435,7 +435,7 @@
\o Use \c{class} instead of \c{struct}. Some compilers mangle that
difference into the symbol names and spit out warnings if a struct
declaration is followed by a class definition. To avoid ongoing
changes from one to the other we declare \c{class} the prefered way.
changes from one to the other we declare \c{class} the preferred way.
\endlist
......@@ -782,7 +782,7 @@
reentrant, though.
\o A \c char is signed or unsigned dependent on the architecture. Use signed
\c char or \c uchar if you explicitely want a signed or unsigned char.
\c char or \c uchar if you explicitly want a signed or unsigned char.
The following code will break on PowerPC, for example:
\code
......@@ -848,7 +848,7 @@
\o No float comparisons (\c{-Wfloat-equal}). Use \c qFuzzyCompare to compare
values with a delta. Use \c qIsNull to check whether a float is
binary 0, instead of comparing it to 0.0, or, prefered, move
binary 0, instead of comparing it to 0.0, or, preferred, move
such code into an implementation file.
\o Do not hide virtual methods in subclasses (\{-Woverloaded-virtual}).
......
......@@ -78,12 +78,12 @@ dev_qch_docs.depends += dev_html_docs
!macx {
inst_qch_docs.files = $$QCH_FILE
inst_qch_docs.path = /share/doc/qtcreator
inst_qch_docs.path = $$QTC_PREFIX/share/doc/qtcreator
inst_qch_docs.CONFIG += no_check_exist no_default_install
INSTALLS += inst_qch_docs
inst_dev_qch_docs.files = $$DEV_QCH_FILE
inst_dev_qch_docs.path = /share/doc/qtcreator
inst_dev_qch_docs.path = $$QTC_PREFIX/share/doc/qtcreator
inst_dev_qch_docs.CONFIG += no_check_exist no_default_install
INSTALLS += inst_dev_qch_docs
......
......@@ -102,7 +102,7 @@
\section2 Supported CDB Versions
The CDB native debugger has similar funtionality to the non-Python GDB
The CDB native debugger has similar functionality to the non-Python GDB
debugger engine. Specifically, it also uses compiled C++ code for the
debugging helper library.
......
......@@ -193,7 +193,7 @@
While this mode does not strictly require a project to be opened in \QC,
it is beneficial to have open one, as it makes setting breakpoints
and stepping throught the code easier.
and stepping through the code easier.
You can specify breakpoints before or after attaching the
debugger to the application.
......
......@@ -1652,7 +1652,7 @@
\row
\o Switch with Next/Previous Parameter
\o Moves a parameter down or up one position in a parameter list.
\o Parameter in the declaration or definition of a fuction or method
\o Parameter in the declaration or definition of a function or method
\row
\o Extract Method
\o Moves the selected code to a new method and replaces the block of
......
......@@ -421,10 +421,10 @@
\o Find previous
\o Shift+F3
\row
\o Find next occurence of selected text
\o Find next occurrence of selected text
\o Ctrl+F3
\row
\o Find previous occurence of selected text
\o Find previous occurrence of selected text
\o Ctrl+Shift+F3
\row
\o Replace next
......
......@@ -391,7 +391,7 @@
\o Return to original size
\o Play and pause movies
\o Play and pause animated GIF and MNG images
\endlist
......
......@@ -245,7 +245,7 @@
\section3 Reverting Changes Using Git
The Git version control system has an index that is used to stage
changes. The index is commited on the next commit. Git allows you to revert
changes. The index is committed on the next commit. Git allows you to revert
back to the state of the last commit as well as to the state staged in the
index.
......
......@@ -197,7 +197,7 @@
sudo apt-get install libgl-dev libglu-dev
\endcode
\section1 Platform Releated Questions
\section1 Platform Related Questions
\bold {Where is application output shown in \QC?}
......
......@@ -509,7 +509,7 @@
\endcode
By default, the scripts are run in the directory corresponding to
\c %TargetPath%. This can be overriden by specifying the attribute
\c %TargetPath%. This can be overridden by specifying the attribute
\c workingdirectory on the element \c generatorscript. For example, if the
script creates the project directory by itself, %Path% can be specified. In
that case, \c --dry-run should output the correct relative paths or absolute
......
......@@ -53,7 +53,7 @@ Column {
* [bool=true] Specifies the grouping behavior. If enabled, the checked property on buttons contained
* in the group will be exclusive.
*
* Note that a button in an exclusive group will allways be checkable
* Note that a button in an exclusive group will always be checkable
*/
property bool exclusive: true
......
......@@ -53,7 +53,7 @@ Row {
* [bool=true] Specifies the grouping behavior. If enabled, the checked property on buttons contained
* in the group will be exclusive.
*
* Note that a button in an exclusive group will allways be checkable
* Note that a button in an exclusive group will always be checkable
*/
property bool exclusive: true
......
......@@ -37,7 +37,7 @@ MouseArea {
// need to reparent it to the root item to fake it upon showing the popup.
// In that case, the popup will also fill the whole window to allow the user to
// close the popup by clicking anywhere in the window. Letting the popup act as the mouse
// area for the button that 'owns' it is also nessesary to support drag'n'release behavior.
// area for the button that 'owns' it is also necessary to support drag'n'release behavior.
// The 'popupframe' delegate will be told to show or hide by assigning
// opacity to 1 or 0, respectively.
......
......@@ -52,6 +52,6 @@ DATA_FILE_PATTERNS = \
!macx {
qmlfiles.files = $$PWD/*.qml $$PWD/qmldir $$PWD/images $$PWD/custom
qmlfiles.path = /$${IDE_LIBRARY_BASENAME}/qtcreator/qtcomponents
qmlfiles.path = $$QTC_PREFIX/$${IDE_LIBRARY_BASENAME}/qtcreator/qtcomponents
INSTALLS += qmlfiles
}
......@@ -3,6 +3,10 @@ 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) {
......
......@@ -26,19 +26,23 @@ macx {
dmg.depends = deployqt
QMAKE_EXTRA_TARGETS += codesign dmg
} else {
deployqt.commands = $$PWD/scripts/deployqt.py -i $(INSTALL_ROOT)
deployqt.commands = $$PWD/scripts/deployqt.py -i \"$(INSTALL_ROOT)$$QTC_PREFIX\"
deployqt.depends = install
win32 {
bindist.commands ~= s,/,\\\\,g
deployqt.commands ~= s,/,\\\\,g
deployartifacts.depends = install
PLATFORM="windows"
deployartifacts.commands = git clone "git://gitorious.org/qt-creator/binary-artifacts.git"&& xcopy /s /q /y /i "binary-artifacts\\win32" $(INSTALL_ROOT)&& rmdir /s /q binary-artifacts
deployartifacts.commands = git clone "git://gitorious.org/qt-creator/binary-artifacts.git"&& xcopy /s /q /y /i "binary-artifacts\\win32" \"$(INSTALL_ROOT)$$QTC_PREFIX\"&& rmdir /s /q binary-artifacts
QMAKE_EXTRA_TARGETS += deployartifacts
}
else:linux-*:PLATFORM="linux-$${QT_ARCH}"
else:PLATFORM="unknown"
bindist.commands = $$PWD/scripts/bindistHelper.py "$(INSTALL_ROOT)" "$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)"
else:linux-*: PLATFORM = "linux-$${QT_ARCH}"
else:PLATFORM = "unknown"
PATTERN = $${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)
bindist.commands = 7z a -mx9 qt-creator-$${PATTERN}.7z \"$(INSTALL_ROOT)$$QTC_PREFIX\"
win32 {
bindist.commands ~= s,/,\\\\,g
}
}
bindist.depends = deployqt
QMAKE_EXTRA_TARGETS += deployqt bindist
......@@ -12,6 +12,7 @@ Project {
references: [
"lib/qtcreator/qtcomponents/qtcomponents.qbs",
"share/share.qbs",
"share/qtcreator/translations/translations.qbs",
"src/libs/3rdparty/botan/botan.qbs",
"src/libs/aggregation/aggregation.qbs",
"src/libs/cplusplus/cplusplus.qbs",
......@@ -79,7 +80,8 @@ Project {
"src/tools/qtcdebugger/qtcdebugger.qbs",
"src/tools/qtcreatorcrashhandler/qtcreatorcrashhandler.qbs",
"src/tools/qtpromaker/qtpromaker.qbs",
"src/plugins/cpaster/frontend/frontend.qbs"
"src/plugins/cpaster/frontend/frontend.qbs",
"src/tools/sdktool/sdktool.qbs"
]
Product {
......
#!/usr/bin/env python
################################################################################
# Copyright (c) 2011 Nokia Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Nokia Corporation, nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
################################################################################
import os
import sys
import getopt
import subprocess
import tempfile
import re
import shutil
def usage():
print "Usage: %s <creator_install_dir> <pattern>" % os.path.basename(sys.argv[0])
def main():
try:
opts, args = getopt.gnu_getopt(sys.argv[1:], 'h', ['help'])
except:
usage()
sys.exit(2)
for o, a in opts:
if o in ('-h', '--help'):
usage()
sys.exit(0)
if len(args) < 2:
usage()
sys.exit(2)
sourcedir=args[0]
pattern=args[1]
try:
temp_dir = tempfile.mkdtemp()
except:
print "Failed to create a temporary directory!"
sys.exit(2)
try:
formatted_dirname = "qt-creator-%s" % pattern
temp_fullpath = os.path.join(temp_dir, formatted_dirname)
print "Copying files to temporary directory '%s' for packaging..." % temp_fullpath
shutil.copytree(sourcedir, temp_fullpath, symlinks=True)
print "7-zipping temporary directory..."
output = subprocess.check_output(['7z', 'a', '-mx9', formatted_dirname+'.7z', temp_fullpath])
print output
except:
print "Error occured, cleaning up..."
shutil.rmtree(temp_dir)
sys.exit(2)
print "Cleaning up..."
shutil.rmtree(temp_dir)
print "Done."
if __name__ == "__main__":
if sys.platform == 'darwin':
print "Mac OS does not require this script!"
sys.exit(2)
else:
main()
......@@ -1695,7 +1695,7 @@ static void qDumpQImage(QDumper &d)
static void qDumpQImageData(QDumper &d)
{
const QImage &im = *reinterpret_cast<const QImage *>(d.data);
const QByteArray ba(QByteArray::fromRawData((const char*)im.bits(), im.numBytes()));
const QByteArray ba(QByteArray::fromRawData((const char*)im.bits(), im.byteCount()));
d.putItem("type", NS "QImageData");
d.putItem("numchild", "0");
#if 1
......
......@@ -34,6 +34,6 @@ macx {
info.output = $$DESTDIR/$${TARGET}.app/Contents/Info.plist
QMAKE_SUBSTITUTES += info
} else {
target.path = /bin
target.path = $$QTC_PREFIX/bin
INSTALLS += target
}
......@@ -20,6 +20,6 @@ macx {
info.output = $$DESTDIR/$${TARGET}.app/Contents/Info.plist
QMAKE_SUBSTITUTES += info
} else {
target.path = /bin
target.path = $$QTC_PREFIX/bin
INSTALLS += target
}
......@@ -63,7 +63,7 @@ OTHER_FILES += $$FILES
!macx {
for(data_dir, DATA_DIRS) {
eval($${data_dir}.files = $$quote($$PWD/$$data_dir))
eval($${data_dir}.path = /share/qtcreator)
eval($${data_dir}.path = $$QTC_PREFIX/share/qtcreator)
INSTALLS += $$data_dir
}
} else {
......@@ -116,7 +116,7 @@ QMAKE_EXTRA_COMPILERS += unconditionalCopy2build
!macx {
for(data_dir, DATA_DIRS) {
eval($${data_dir}.files = $$IDE_DATA_PATH/$$data_dir)
eval($${data_dir}.path = /share/qtcreator)
eval($${data_dir}.path = $$QTC_PREFIX/share/qtcreator)
eval($${data_dir}.CONFIG += no_check_exist)
INSTALLS += $$data_dir
}
......
......@@ -120,6 +120,6 @@ isEmpty(vcproj) {
}
qmfiles.files = $$prependAll(LANGUAGES, $$OUT_PWD/qtcreator_,.qm)
qmfiles.path = /share/qtcreator/translations
qmfiles.path = $$QTC_PREFIX/share/qtcreator/translations
qmfiles.CONFIG += no_check_exist
INSTALLS += qmfiles
import qbs.base 1.0
Product {
type: "qm"
name: "translations"
Depends { name: "Qt.core" }
destination: "share/qtcreator/translations"
files: "*.ts"
}
......@@ -104,7 +104,7 @@ Rectangle {
imageUrl: "widgets/images/gettingStarted01.png"
title: qsTr("IDE Overview")
description: qsTr("To find out what kind of integrated enviroment (IDE) Qt Creator is.")
description: qsTr("To find out what kind of integrated environment (IDE) Qt Creator is.")
number: 1
onClicked: gettingStarted.openHelp("qthelp://com.nokia.qtcreator/doc/creator-overview.html")
......@@ -114,7 +114,7 @@ Rectangle {
x: 250
y: 83
description: qsTr("To become familar with the parts of the Qt Creator user interface and to learn how to use them.")
description: qsTr("To become familiar with the parts of the Qt Creator user interface and to learn how to use them.")
title: qsTr("User Interface")
imageUrl: "widgets/images/gettingStarted02.png"
number: 2
......
......@@ -18,7 +18,7 @@ QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
}
win32 {
RC_FILE = qtcreator.rc
target.path = /bin
target.path = $$QTC_PREFIX/bin
INSTALLS += target
} else:macx {
LIBS += -framework CoreFoundation
......@@ -30,7 +30,7 @@ win32 {
info.output = $$IDE_BIN_PATH/../Info.plist
QMAKE_SUBSTITUTES = info
} else {
target.path = /bin
target.path = $$QTC_PREFIX/bin
INSTALLS += target
}
......
......@@ -49,6 +49,7 @@
#include <QList>
#include <QDebug>
#include <QSet>
#include <map>
using namespace CPlusPlus;
......@@ -630,7 +631,8 @@ bool ResolveExpression::visit(CallAST *ast)
}
if (_reference) {
_results.clear();
typedef std::multimap<int, LookupItem> LookupMap;
LookupMap sortedResults;
foreach (const LookupItem &base, baseResults) {
if (Function *funTy = base.type()->asFunctionType()) {
if (! maybeValidPrototype(funTy, actualArgumentCount))
......@@ -655,13 +657,13 @@ bool ResolveExpression::visit(CallAST *ast)
++score;
}
if (score)
_results.prepend(base);
else
_results.append(base);
sortedResults.insert(LookupMap::value_type(-score, base));
}
}
_results.clear();
for (LookupMap::const_iterator it = sortedResults.begin(); it != sortedResults.end(); ++it)
_results.append(it->second);
if (_results.isEmpty())
_results = baseResults;
......
......@@ -33,6 +33,6 @@ SOURCES += qtmenu.cpp \
qwheelarea.cpp
!macx {
target.path = /$${IDE_LIBRARY_BASENAME}/qtcreator/qtcomponents/plugin
target.path = $$QTC_PREFIX/$${IDE_LIBRARY_BASENAME}/qtcreator/qtcomponents/plugin
INSTALLS += target
}
......@@ -82,6 +82,6 @@ HEADERS += extensioncontext.h \
knowntype.h \
symbolgroupnode.h
target.path = /lib/$${DIRNAME}
target.path = $$QTC_PREFIX/lib/$${DIRNAME}
INSTALLS += target
......@@ -109,7 +109,9 @@ QString BuildableHelperLibrary::qtVersionForQMake(const QString &qmakePath, bool
static QRegExp regexp(QLatin1String("(QMake version|QMake version:)[\\s]*([\\d.]*)"),
Qt::CaseInsensitive);
regexp.indexIn(output);
if (regexp.cap(2).startsWith(QLatin1String("2."))) {
const QString qmakeVersion = regexp.cap(2);
if (qmakeVersion.startsWith(QLatin1String("2."))
|| qmakeVersion.startsWith(QLatin1String("3."))) {
static QRegExp regexp2(QLatin1String("Using Qt version[\\s]*([\\d\\.]*)"),
Qt::CaseInsensitive);
regexp2.indexIn(output);
......
......@@ -374,11 +374,24 @@ PersistentSettingsWriter::PersistentSettingsWriter(const FileName &fileName, con
m_fileName(fileName), m_docType(docType)
{ }
PersistentSettingsWriter::~PersistentSettingsWriter()
{
write(m_savedData, 0);
}
bool PersistentSettingsWriter::save(const QVariantMap &data, QWidget *parent) const
{
if (data == m_savedData)
return true;
return write(data, parent);
}
FileName PersistentSettingsWriter::fileName() const
{ return m_fileName; }
bool PersistentSettingsWriter::write(const QVariantMap &data, QWidget *parent) const
{
QDir tmp;
tmp.mkpath(m_fileName.toFileInfo().path());
Utils::FileSaver saver(m_fileName.toString(), QIODevice::Text);
......@@ -411,7 +424,4 @@ bool PersistentSettingsWriter::save(const QVariantMap &data, QWidget *parent) co
return ok;
}
FileName PersistentSettingsWriter::fileName() const
{ return m_fileName; }
} // namespace Utils
......@@ -60,11 +60,15 @@ class QTCREATOR_UTILS_EXPORT PersistentSettingsWriter
{
public:
PersistentSettingsWriter(const FileName &fileName, const QString &docType);
~PersistentSettingsWriter();
bool save(const QVariantMap &data, QWidget *parent) const;
Utils::FileName fileName() const;
private:
bool write(const QVariantMap &data, QWidget *parent) const;
const Utils::FileName m_fileName;
const QString m_docType;
mutable QMap<QString, QVariant> m_savedData;
......
......@@ -17,5 +17,5 @@ build_all:!build_pass {
CONFIG += release
}
target.path = /bin # FIXME: libexec, more or less
target.path = $$QTC_PREFIX/bin # FIXME: libexec, more or less
INSTALLS += target
......@@ -20,5 +20,5 @@ unix {
LIBS += -lshell32
}
target.path = /bin # FIXME: libexec, more or less
target.path = $$QTC_PREFIX/bin # FIXME: libexec, more or less
INSTALLS += target
......@@ -213,7 +213,9 @@ QtcLibrary {
}
ProductModule {
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ["concurrent", "widgets" ] }
cpp.includePaths: [".."]
}
}
......@@ -344,7 +344,7 @@ QModelIndex BookmarkManager::index(int row, int column, const QModelIndex &paren
if (parent.isValid())
return QModelIndex();
else
return createIndex(row, column, 0);
return createIndex(row, column);