Commit 30fae3ea authored by con's avatar con
Browse files

Merge remote branch 'origin/2.0'

Conflicts:
	doc/qtcreator.qdoc
	src/plugins/projectexplorer/taskwindow.h
	src/plugins/qmldesigner/designercore/model/modelmerger.cpp
	src/plugins/qmljseditor/qmljshoverhandler.h
	src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationwidget.cpp
	src/plugins/subversion/subversionplugin.cpp
parents ce80ee4f 5e40846c
......@@ -36,6 +36,11 @@ Editing
the syntax highlighting.
* Block selection defines a find & replace scope
* Added customizable default file encoding (in addition to the project setting)
* Added syntax highlighting for CMake project files
* Fixed .pro files being reformatted if files have been added or removed.
In addition, whitespace is preserved
* Fixed the file system sidebar to update automatically
* Fixed updating code completion for generated UI header files
CodePaster
* Implemented new protocol of pastebin.com including list functionality
......@@ -55,6 +60,9 @@ Project support
* Allow changing the build environment for Generic Projects
* Added context menu options to open file manager or terminal in a files
directory
* Fixed the DEFINES and INCLUDES set in .pro files to be dealt with
on a file-specific level and enabled the handling of DEFINES.
Also, the .qmake.cache is now parsed
Debugging
* Add on-device debugging for the Symbian platform using gdb
......@@ -72,6 +80,10 @@ Debugging
names
* pdb: Added some basic debugging for Python scripts based on pdb
* Improvements in the dialogs, status messages, and general appearance
* Fixed debugging helpers to work while debugging applications on devices
* On Linux and Windows, enabled installing Qt with one user account and
then using it with another without workarounds
* Fixed all data types to work in the Watch Window of CDB
Help
......
......@@ -1787,7 +1787,7 @@
\image qtcreator-qt4-qtversions-win-msvc.png
\endlist
If you are using \bold{Qt for Symbian} and your S60 SDK is registered
If you are using \bold{Qt for Symbian} and your Symbian SDK is registered
with devices.exe, Qt Creator automatically detects the Qt version. To add a
Qt for Symbian version:
\list 1
......@@ -1804,7 +1804,7 @@
the \c{PATH} environment variable.
\o To build an application for the emulator (WINSCW toolchain), enter
the path to your Carbide C++ installation directory in
\gui{Carbide Directory}.
\gui{Carbide directory}.
\note You need to have Carbide C++ version 2.0 or later installed.
\endlist
......@@ -2142,7 +2142,7 @@
\list
\o You selected the Symbian Device target for building the application.
\o The settings for the Qt version you use to build your project are
correct. The path to the S60 SDK must point to the S60 SDK
correct. The path to the Symbian SDK must point to the Symbian SDK
installation directory. Select \gui Tools > \gui Options...
> \gui Debugger > \gui{Symbian TRK} and check if it points to the
debugger toolchain.
......@@ -2697,12 +2697,12 @@
\o Click
\inlineimage{qtcreator-run.png}
to build the application for Qt Simulator.
to build the application and run it in Qt Simulator.
\o To see the compilation progress, press \key{Alt+4} to open the
\gui Compile Output pane.
The gui Build progress bar on the toolbar turns green when the project
The \gui Build progress bar on the toolbar turns green when the project
is successfully built. The application opens in Qt Simulator.
\image {qt-simulator.png} "Qt Simulator"
......@@ -5025,7 +5025,7 @@
specified in the \c CMake project file.
Known issues for the current version can be found
\l{Known Issues of version 2.0.80}{here}.
\l{Known Issues}{here}.
\section1 Adding External Libraries to a CMake Project
......@@ -5782,6 +5782,32 @@
\image qtcreator-mad-developer-screenshot.png
\endlist
\section1 Installing Qt Mobility APIs
To develop applications that use the Qt Mobility APIs, you must install the
APIs on the devices. The APIs are not available in the Nokia N900 package
manager, and therefore, you must install them from the command line as the
root user. To become the root user you must first install \c rootsh from the
application manager.
\list 1
\o On the device, install \c rootsh from the \gui {Application Manager}.
\o In \gui Programs, select \c {X Terminal} to open a terminal window.
\o To switch to the root user, enter the following command:
\c{sudo gainroot}
\o To install Qt Mobility libraries, enter the following command:
\c{apt-get install libqtm-*}
\o To confirm the installation, enter: \c Y
\o Close the terminal.
\endlist
\section1 Setting Up Network Connectivity on Development PC
Use the network configuration tools on your platform to specify the
......@@ -5879,6 +5905,13 @@
necessary software is installed and configured automatically and you
only need to configure a connection to the device.
By default, you create the connection as the \e developer user. This
protects real user data on the device from getting corrupted during
testing. If you write applications that use Mobility APIs, you might want
to test them with real user data. To create a connection as a user, specify
the \gui Username and \gui Password in Qt Creator. For more information, see
\l{Testing with User Data}.
You can protect the connections between Qt Creator and the Maemo emulator
or a device by using either a password or an SSH key. You must always
use a password for the initial connection, but can then deploy an SSH
......@@ -6000,6 +6033,30 @@
\endlist
\section2 Testing with User Data
To run your application as the default user, you must first assign a password
for the user account and then create the connection to the device as the
user:
\list 1
\o On the device, in \gui Programs, select \c {X Terminal} to open a
terminal window.
\o To switch to the root user, enter the following command:
\c{sudo gainroot}
\o To specify the password, enter the following command:
\c {passwd user}
\o In Qt Creator, Select \gui Tools > \gui Options... > \gui Projects >
\gui{Maemo Device Configurations}.
\o Specify the username \c user and the password in the device configuration.
\endlist
\section2 Generating SSH Keys
If you do not have an SSH public and private key pair, you can generate it
......@@ -6186,7 +6243,9 @@
\o The \l{http://tools.ext.nokia.com/trk/}{App TRK} application for
your device
\o The \e{qt_installer.sis} package installed on the device, that is
delivered with the Qt SDK.
delivered with the Qt SDK
\o \e {Qt Mobility APIs} installed on the device, if you use them in
applications
\endlist
To run your applications in the Symbian emulator, you also need
......@@ -6221,6 +6280,10 @@
\endlist
\note If errors occur during the installation, copy the .sis files from
\c {<NokiaQtSDK_install_path>\Symbian\sis} to the device using USB storage
mode. Then install them from the file manager on the device.
\section1 Adding Symbian Platform SDKs
Nokia Qt SDK contains all the tools you need for developing Qt applications for
......@@ -6230,33 +6293,33 @@
\list
\o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/S60SDK/}
{S60 Platform SDK 3rd Edition FP1 or higher}.
\o Either the GCCE ARM Toolchain that is included in the S60 Platform
\o Either the GCCE ARM Toolchain that is included in the Symbian
SDKs, or RVCT 2.2 [build 686] or later (which is not available free
of charge)(Your environment needs to find the compiler in the PATH).
\o Qt for Symbian 4.6.2 or later, installed into the S60 SDKs you want
\o Qt for Symbian 4.6.2 or later, installed into the Symbian SDKs you want
to use.
\endlist
\section2 Setting Up Qt Creator
When you run Qt Creator after installing the S60 Platform SDK and Qt for
When you run Qt Creator after installing the Symbian SDK and Qt for
Symbian, the installed SDKs and their corresponding Qt versions are
automatically detected. For each detected S60 SDK with Qt, a special entry
automatically detected. For each detected Symbian SDK with Qt, a special entry
is made in the Qt version management settings in \gui{Tools} >
\gui{Options...} > \gui{Qt4} > \gui{Qt Versions}.
\note If you manually add a Qt version for Symbian, you must
also manually specify the S60 SDK to use for this version.
also manually specify the Symbian SDK to use for this version.
\image qtcreator-qt4-qtversions-win-symbian.png
If you want to run your applications in the Symbian emulator, you need to
point Qt Creator to the Metrowerks Compiler that you want to use, by
setting the \gui{Carbide Directory} of the Qt version to the corresponding
setting the \gui{Carbide directory} of the Qt version to the corresponding
Carbide.c++ installation directory.
You can check what S60 SDKs and corresponding Qt versions are found in the
You can check which Symbian SDKs and corresponding Qt versions are found in the
\gui{Tools} > \gui{Options...} > \gui{Qt4} > \gui{S60 SDKs} preference
page.
......@@ -7100,41 +7163,16 @@
\title Known Issues
There are some known issues with Qt Creator.
The development team is aware of them, there is no need to report them as bugs.
This section lists known issues in Qt Creator version 2.0.0.
The development team is aware of them, and therefore, you do not need to
report them as bugs.
\section1 Known Issues of Version 2.0.80
For a list of fixed issues and added features, see the changelog file in
the qtcreator\dist folder or the \l{http://bugreports.qt.nokia.com}{Qt Bug Tracker}.
\list
\o On Windows, debugging a MinGW-built console application (with \gui{Run in terminal}
checked) using gdb does not work due to a bug in gdb related to attaching to
stopped processes (see \l{http://bugreports.qt.nokia.com/browse/QTCREATORBUG-1020}).
\o Debugging Helper does not work while performing On-Device Debugging.
\o QML Preview (Run Project) only works if built against Qt with
Declarative UI.
\o Setting breakpoints in code that is compiled into the binary more
than once does not work.
\o On Linux and Windows, installing Qt with one user account and
then using it with another requires other users to manually set
the Qt version. On Windows, setting the MinGW location is
required as well. The same applies to the location of GDB for Symbian.
A workaround is to copy %APPDATA%/Nokia/qtcreator.ini (Windows) or
$HOME/.config/Nokia/QtCreator.ini (Linux) from the directory
of the user who installed Qt Creator to the other user.
This issue does not exist on Mac OS X.
\endlist
\section1 Known Issues of Version 1.2.0 and 1.2.1
\section1 General
\list
\o Gdb on Windows may not work if the 'Embassy \reg Security Center' software
by 'Wave \reg Systems' is installed and active (causing crashes in \c{vxvault.dll)}).
\o Only simple data types (POD) work in the Watch Window of CDB.
\o Qt Creator uses SQLite for storing some of its settings. SQLite is
known to have problems with certain NFS servers (most notably the
......@@ -7143,9 +7181,18 @@
NFS share and you encounter this issue, one option would be to
switch to the nfs-kernel-server, or create a symlink so that the
settings are stored locally.
\endlist
\section1 Known Issues of Version 1.1.0
\section1 Editing
\list
\o Code completion does not support typedefs for nested classes.
\endlist
\section1 Projects
\list
\o Paths or file names containing spaces or special characters, e.g.,
......@@ -7156,59 +7203,39 @@
items with names consisting of plain characters, numbers,
underscores, and hyphens.
\o \c{.pro} files are reformatted if files have been added or removed.
Whitespace is not preserved.
\o There is no IDE support for adding files to include (\c .pri) files.
\o There is no IDE support for adding/removing sub-projects. Project
hierarchies (SUBDIRS template) have to be created manually.
\o The file system sidebar does not update automatically. As a
workaround, switch to another directory and then back.
\o Creating new \c CMake projects with Qt Creator is not supported.
\endlist
\o Loading KDE4 designer plugins breaks the style in KDE < 4.2.1
due to a bug in KDE.
\section1 Debugging
\o The DEFINES and INCLUDES set in \c{.pro} files are not dealt with
on a file-specific level. Because of this, handling of DEFINES has
been disabled completely. Also the \c{.qmake.cache} is not being
parsed. In general, the \c{.pro} file parser is incomplete and
problems are still to be expected.
\list
\o Code completion for generated UI header files is updated only
after a build.
\o When debugging executables created by the GNU Compiler version 4.5.0
(all platforms), some data types will not be displayed in the
\gui{Locals and Watchers} view due to missing debug information.
\o Code completion does not support typedefs for nested classes.
\o On Windows, debugging a MinGW-built console application (with \gui{Run in terminal}
checked) using gdb does not work due to a bug in gdb related to attaching to
stopped processes (see \l{http://bugreports.qt.nokia.com/browse/QTCREATORBUG-1020}).
\o There is a kernel bug essentially making debugging unreliable on
2.6.24 kernels for i386 (which is, unfortunately, the default on
Ubuntu 8.04). See
\l{https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/230315/} for
details. The only solution to this problem is to boot another
kernel.
\o Gdb on Windows may not work if the 'Embassy \reg Security Center' software
by 'Wave \reg Systems' is installed and active (causing crashes in \c{vxvault.dll)}).
\o Gdb may take long to load debugging symbols, especially from large
libraries like \c libQtWebKit. Starting the debugging module can
take up to several minutes without visible progress.
\o Setting breakpoints in code that is compiled into the binary more
than once does not work.
\o Setting breakpoints in files that do not have unique absolute
paths may fail. For example, remounting parts of a file system
using the --bind mount option.
\o There is no syntax highlighting for \c CMake project files.
\o Project files included from \c{CMakeLists.txt} are not shown in the
navigation tree.
\o Using the Visual Studio Compiler with \c CMake is not supported.
\o Creating new \c CMake projects with Qt Creator is not supported.
\o Having more than one build directory for \c CMake is not supported.
\o Changing the build directory for \c CMake after the initial import
is disabled.
\endlist
*/
......
......@@ -62,7 +62,6 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(CMakeTarget *parent, CMakeBuild
m_msvcVersion(source->m_msvcVersion)
{
cloneSteps(source);
m_buildDirectory = cmakeTarget()->defaultBuildDirectory();
}
QVariantMap CMakeBuildConfiguration::toMap() const
......
......@@ -144,6 +144,11 @@ MimeDatabase *CoreImpl::mimeDatabase() const
return m_mainwindow->mimeDatabase();
}
HelpManager *CoreImpl::helpManager() const
{
return m_mainwindow->helpManager();
}
QSettings *CoreImpl::settings(QSettings::Scope scope) const
{
return m_mainwindow->settings(scope);
......
......@@ -67,6 +67,7 @@ public:
VCSManager *vcsManager() const;
ModeManager *modeManager() const;
MimeDatabase *mimeDatabase() const;
HelpManager *helpManager() const;
QSettings *settings(QSettings::Scope scope = QSettings::UserScope) const;
SettingsDatabase *settingsDatabase() const;
......
......@@ -6,6 +6,7 @@ QT += xml \
script \
svg \
sql
CONFIG += help
include(../../qtcreatorplugin.pri)
include(../../libs/utils/utils.pri)
include(../../shared/scriptwrapper/scriptwrapper.pri)
......@@ -86,7 +87,8 @@ SOURCES += mainwindow.cpp \
editortoolbar.cpp \
ssh/ne7sshobject.cpp \
ssh/sshconnection.cpp \
ssh/sshkeygenerator.cpp
ssh/sshkeygenerator.cpp \
helpmanager.cpp
HEADERS += mainwindow.h \
editmode.h \
......@@ -171,7 +173,8 @@ HEADERS += mainwindow.h \
editortoolbar.h \
ssh/ne7sshobject.h \
ssh/sshconnection.h \
ssh/sshkeygenerator.h
ssh/sshkeygenerator.h \
helpmanager.h
FORMS += dialogs/newdialog.ui \
actionmanager/commandmappings.ui \
......
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** 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.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#include "helpmanager.h"
#include "icore.h"
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
#include <QtCore/QStringList>
#include <QtHelp/QHelpEngineCore>
#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlDriver>
#include <QtSql/QSqlError>
#include <QtSql/QSqlQuery>
namespace Core {
HelpManager *HelpManager::m_instance = 0;
static const char linksForKeyQuery[] = "SELECT d.Title, f.Name, e.Name, "
"d.Name, a.Anchor FROM IndexTable a, FileNameTable d, FolderTable e, "
"NamespaceTable f WHERE a.FileId=d.FileId AND d.FolderId=e.Id AND "
"a.NamespaceId=f.Id AND a.Name='%1'";
// -- DbCleaner
struct DbCleaner {
DbCleaner(const QString &dbName)
: name(dbName) {}
~DbCleaner() {
QSqlDatabase::removeDatabase(name);
}
QString name;
};
// -- HelpManager
HelpManager::HelpManager(QObject *parent)
: QObject(parent)
, m_needsSetup(true)
, m_helpEngine(0)
{
Q_ASSERT(!m_instance);
m_instance = this;
connect(Core::ICore::instance(), SIGNAL(coreOpened()), this,
SLOT(setupHelpManager()));
}
HelpManager::~HelpManager()
{
delete m_helpEngine;
m_helpEngine = 0;
m_instance = 0;
}
HelpManager* HelpManager::instance()
{
Q_ASSERT(m_instance);
return m_instance;
}
QString HelpManager::collectionFilePath()
{
const QFileInfo fi(Core::ICore::instance()->settings()->fileName());
const QDir directory(fi.absolutePath() + QLatin1String("/qtcreator"));
if (!directory.exists())
directory.mkpath(directory.absolutePath());
return QDir::cleanPath(directory.absolutePath() + QLatin1String("/helpcollection.qhc"));
}
void HelpManager::registerDocumentation(const QStringList &files)
{
if (m_needsSetup) {
m_filesToRegister.append(files);
return;
}
bool docsChanged = false;
foreach (const QString &file, files) {
const QString &nameSpace = m_helpEngine->namespaceName(file);
if (nameSpace.isEmpty())
continue;
if (!m_helpEngine->registeredDocumentations().contains(nameSpace)) {
if (m_helpEngine->registerDocumentation(file)) {
docsChanged = true;
} else {
qWarning() << "Error registering namespace '" << nameSpace
<< "' from file '" << file << "':" << m_helpEngine->error();
}
}
}
if (docsChanged)
emit documentationChanged();
}
void HelpManager::unregisterDocumentation(const QStringList &nameSpaces)
{
if (m_needsSetup) {
m_nameSpacesToUnregister.append(nameSpaces);
return;
}
bool docsChanged = false;
foreach (const QString &nameSpace, nameSpaces) {
if (m_helpEngine->unregisterDocumentation(nameSpace)) {
docsChanged = true;
} else {
qWarning() << "Error unregistering namespace '" << nameSpace
<< "' from file '" << m_helpEngine->documentationFileName(nameSpace)
<< "': " << m_helpEngine->error();
}
}
if (docsChanged)
emit documentationChanged();
}
QUrl buildQUrl(const QString &nameSpace, const QString &folder,
const QString &relFileName, const QString &anchor)
{
QUrl url;
url.setScheme(QLatin1String("qthelp"));
url.setAuthority(nameSpace);
url.setPath(folder + QLatin1Char('/') + relFileName);
url.setFragment(anchor);
return url;
}
// This should go into Qt 4.8 once we start using it for Qt Creator
QMap<QString, QUrl> HelpManager::linksForKeyword(const QString &key) const
{
QMap<QString, QUrl> links;
if (m_needsSetup)
return links;
const QLatin1String sqlite("QSQLITE");
const QLatin1String name("HelpManager::linksForKeyword");
DbCleaner cleaner(name);
QSqlDatabase db = QSqlDatabase::addDatabase(sqlite, name);
if (db.driver() && db.driver()->lastError().type() == QSqlError::NoError) {
const QStringList &registeredDocs = m_helpEngine->registeredDocumentations();
foreach (const QString &nameSpace, registeredDocs) {
db.setDatabaseName(m_helpEngine->documentationFileName(nameSpace));
if (db.open()) {
QSqlQuery query = QSqlQuery(db);
query.setForwardOnly(true);
query.exec(QString::fromLatin1(linksForKeyQuery).arg(key));
while (query.next()) {
QString title = query.value(0).toString();
if (title.isEmpty()) // generate a title + corresponding path
title = key + QLatin1String(" : ") + query.value(3).toString();
links.insertMulti(title, buildQUrl(query.value(1).toString(),