forked from qt-creator/qt-creator
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
This commit is contained in:
@@ -75,13 +75,13 @@
|
||||
Tutorial chapters:
|
||||
|
||||
\list 1
|
||||
\o \l{Designing the User Interface}
|
||||
\o \l{Adding Addresses}
|
||||
\o \l{Navigating between Entries}
|
||||
\o \l{Editing and Removing Addresses}
|
||||
\o \l{Adding a Find Function}
|
||||
\o \l{Loading and Saving}
|
||||
\o \l{Additional Features}
|
||||
\o \l{examples/addressbook-sdk/part1}{Designing the User Interface}
|
||||
\o \l{examples/addressbook-sdk/part2}{Adding Addresses}
|
||||
\o \l{examples/addressbook-sdk/part3}{Navigating between Entries}
|
||||
\o \l{examples/addressbook-sdk/part4}{Editing and Removing Addresses}
|
||||
\o \l{examples/addressbook-sdk/part5}{Adding a Find Function}
|
||||
\o \l{examples/addressbook-sdk/part6}{Loading and Saving}
|
||||
\o \l{examples/addressbook-sdk/part7}{Additional Features}
|
||||
\endlist
|
||||
|
||||
Although this little application does not look much like a fully-fledged
|
||||
@@ -96,7 +96,8 @@
|
||||
/*!
|
||||
\page tutorials-addressbook-sdk-part1.html
|
||||
\contentspage {Address Book Tutorial}{Contents}
|
||||
\nextpage \l{Adding Addresses}{Chapter 2}
|
||||
\nextpage \l{examples/addressbook-sdk/part2}{Chapter 2}
|
||||
\example examples/addressbook-sdk/part1
|
||||
\title Address Book 1 - Designing the User Interface
|
||||
|
||||
The first part of this tutorial covers the design of the basic graphical
|
||||
@@ -172,6 +173,48 @@
|
||||
same application or library, and the code for the subclass can be
|
||||
reused in other projects.
|
||||
\endlist
|
||||
|
||||
Since Qt does not provided a specific address book widget, we subclass a
|
||||
standard Qt widget class and add features to it. The \c AddressBook class
|
||||
we create in this tutorial can be reused in situations where a basic
|
||||
address book is needed.
|
||||
|
||||
|
||||
\section1 Defining the AddressBook Class
|
||||
|
||||
The \l{examples/addressbook-sdk/part1/addressbook.h}{\c addressbook.h} file
|
||||
is used to define the \c AddressBook class.
|
||||
|
||||
We start by looking at what is already provided for us by Qt Creator. The
|
||||
\c AddressBook class has been defined as a QWidget subclass with a
|
||||
constructor and destructor.The Q_OBJECT macro is used to indicate that the
|
||||
class uses internationalization and Qt's signals and slots features, even
|
||||
if we do not use all of htese features at this stage.
|
||||
|
||||
\snippet examples/addressbook-sdk/part1/addressbook.h class definition
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -964,6 +964,8 @@
|
||||
\nextpage creator-cmake-support.html
|
||||
|
||||
\title Debugging with Qt Creator
|
||||
|
||||
|
||||
\section1 Introduction
|
||||
|
||||
Qt Creator does not have its own debugger. Instead, it provides a graphical
|
||||
@@ -985,7 +987,7 @@
|
||||
\row
|
||||
\o Windows
|
||||
\o Microsoft Visual C++ Compiler
|
||||
\o Debugging Tools for Windows / Microsoft Console Debugger (CDB)
|
||||
\o Debugging Tools for Windows/Microsoft Console Debugger (CDB)
|
||||
\endtable
|
||||
|
||||
The frontend allows you to
|
||||
@@ -1004,6 +1006,28 @@
|
||||
is able to present Qt's data clearly.
|
||||
|
||||
|
||||
\section1 Debugger Engine Installation Notes
|
||||
|
||||
\table
|
||||
\header
|
||||
\o Debugger Engine
|
||||
\o Notes
|
||||
\row
|
||||
\o Debugging Tools for Windows
|
||||
\o Using this engine requires you to install the
|
||||
\e{Debugging Tools for Windows} 32-bit package (Version 6.10),
|
||||
which is freely available for download from the
|
||||
\l{http://msdn.microsoft.com/en-us/default.aspx}
|
||||
{Microsoft Developer Network} or directly from
|
||||
\l{http://www.microsoft.com/whdc/devtools/debugging/installx86.Mspx}
|
||||
{Microsoft}. The pre-built \e{Qt SDK for Windows} will make use
|
||||
of the library if it is present on the system. When building Qt
|
||||
Creator using the Microsoft Visual C++ Compiler, the
|
||||
\c{"%ProgramFiles%\Debugging Tools for Windows"} path will be
|
||||
checked to ensure that all required header files are there.
|
||||
\endtable
|
||||
|
||||
|
||||
\section1 Interacting with the Debugger
|
||||
|
||||
In \gui Debug mode, several dock widgets are used to interact with the
|
||||
@@ -1147,12 +1171,14 @@
|
||||
\row
|
||||
\i \bold{Note:}
|
||||
|
||||
\row
|
||||
\i Gdb, and therefore Qt Creator's debugger works for optimized
|
||||
builds on Linux and Mac OS X. However, optimization may lead
|
||||
to re-ordering of instructions or sometimes even complete
|
||||
removal of some local variables. In this case, the
|
||||
\gui{Locals and Watchers} view may show unexpected data.
|
||||
|
||||
\row
|
||||
\i The debug information provided by gcc does not include enough
|
||||
information about the time when a variable is initialized.
|
||||
Therefore, Qt Creator can not tell whether the contents of a
|
||||
@@ -1280,25 +1306,6 @@
|
||||
|
||||
\image qtcreator-debugging-buttons.png
|
||||
|
||||
\section1 Debugger Engine Installation Notes
|
||||
|
||||
\table
|
||||
\header
|
||||
\o Debugger Engine
|
||||
\o Notes
|
||||
\row
|
||||
\o Debugging Tools for Windows
|
||||
\o Using this engine requires installing the \e{Debugging Tools for Windows}
|
||||
32-bit package (Version 6.10), which is freely available for download from the
|
||||
\l{http://msdn.microsoft.com/en-us/default.aspx}{Microsoft Developer Network} or
|
||||
directly from \l{http://www.microsoft.com/whdc/devtools/debugging/installx86.Mspx}{Microsoft}.
|
||||
The pre-built \e{Qt SDK for Windows} will make use of the library if it is present
|
||||
on the system.
|
||||
When building \e{Qt Creator} using the \e{Microsoft Visual C++ Compiler},
|
||||
the location \c{"%ProgramFiles%\Debugging Tools for Windows"} will be checked
|
||||
for the required include files.
|
||||
\
|
||||
\endtable
|
||||
*/
|
||||
|
||||
|
||||
@@ -1349,7 +1356,8 @@
|
||||
Qt Creator automatically adds Run Configurations for all the
|
||||
targets specified in the \c CMake project file.
|
||||
|
||||
Known issues for the current version can be found \l{Known Issues}{here}.
|
||||
Known issues for the current version can be found
|
||||
\l{Known Issues of Version 1.1.80}{here}.
|
||||
*/
|
||||
|
||||
|
||||
|
@@ -30,6 +30,8 @@
|
||||
#include "plugindetailsview.h"
|
||||
#include "ui_plugindetailsview.h"
|
||||
|
||||
#include <QtCore/QDir>
|
||||
|
||||
/*!
|
||||
\class ExtensionSystem::PluginDetailsView
|
||||
\brief Widget that displays the contents of a PluginSpec.
|
||||
@@ -74,7 +76,7 @@ void PluginDetailsView::update(PluginSpec *spec)
|
||||
m_ui->compatVersion->setText(spec->compatVersion());
|
||||
m_ui->vendor->setText(spec->vendor());
|
||||
m_ui->url->setText(spec->url());
|
||||
m_ui->location->setText(spec->filePath());
|
||||
m_ui->location->setText(QDir::toNativeSeparators(spec->filePath()));
|
||||
m_ui->description->setText(spec->description());
|
||||
m_ui->copyright->setText(spec->copyright());
|
||||
m_ui->license->setText(spec->license());
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include "pluginspec.h"
|
||||
#include "ui_pluginview.h"
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtGui/QHeaderView>
|
||||
#include <QtGui/QTreeWidgetItem>
|
||||
#include <QtDebug>
|
||||
@@ -124,8 +125,8 @@ void PluginView::updateList()
|
||||
<< spec->name()
|
||||
<< QString("%1 (%2)").arg(spec->version()).arg(spec->compatVersion())
|
||||
<< spec->vendor()
|
||||
<< spec->filePath());
|
||||
item->setToolTip(4, spec->filePath());
|
||||
<< QDir::toNativeSeparators(spec->filePath()));
|
||||
item->setToolTip(4, QDir::toNativeSeparators(spec->filePath()));
|
||||
item->setIcon(0, spec->hasError() ? errorIcon : okIcon);
|
||||
item->setData(0, Qt::UserRole, qVariantFromValue(spec));
|
||||
items.append(item);
|
||||
|
@@ -42,6 +42,7 @@
|
||||
#include <QtGui/QToolBar>
|
||||
#include <QtGui/QDesktopServices>
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QTextStream>
|
||||
#include <QtCore/QDebug>
|
||||
@@ -239,7 +240,7 @@ void WelcomeMode::updateWelcomePage(const WelcomePageData &welcomePageData)
|
||||
for( it = welcomePageData.projectList.constBegin(); it != end; ++it) {
|
||||
const QFileInfo fi((*it).first);
|
||||
str << "<li><p><a href=\"gh-project:" << (*it).first << "\" title=\""
|
||||
<< fi.absolutePath() << "\">" << (*it).second << "</a></p></li>\n";
|
||||
<< QDir::toNativeSeparators(fi.absolutePath()) << "\">" << (*it).second << "</a></p></li>\n";
|
||||
}
|
||||
projectHtml.replace(QLatin1String("<!-- RECENT PROJECTS LIST -->"), projects);
|
||||
}
|
||||
|
@@ -294,7 +294,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
|
||||
if (m_toolTip.isEmpty()) {
|
||||
foreach (const Document::Include &incl, doc->includes()) {
|
||||
if (incl.line() == lineNumber) {
|
||||
m_toolTip = incl.fileName();
|
||||
m_toolTip = QDir::toNativeSeparators(incl.fileName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -24,4 +24,7 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
|
||||
<dependency name="Core" version="1.1.80"/>
|
||||
<dependency name="Find" version="1.1.80"/>
|
||||
</dependencyList>
|
||||
<argumentList>
|
||||
<argument name="-enable-cdb"/>
|
||||
</argumentList>
|
||||
</plugin>
|
||||
|
@@ -148,9 +148,9 @@ extern IDebuggerEngine *createWinEngine(DebuggerManager *)
|
||||
#endif
|
||||
extern IDebuggerEngine *createScriptEngine(DebuggerManager *parent);
|
||||
|
||||
DebuggerManager::DebuggerManager()
|
||||
DebuggerManager::DebuggerManager(const QStringList &arguments)
|
||||
{
|
||||
init();
|
||||
init(arguments);
|
||||
}
|
||||
|
||||
DebuggerManager::~DebuggerManager()
|
||||
@@ -160,7 +160,7 @@ DebuggerManager::~DebuggerManager()
|
||||
delete scriptEngine;
|
||||
}
|
||||
|
||||
void DebuggerManager::init()
|
||||
void DebuggerManager::init(const QStringList &arguments)
|
||||
{
|
||||
m_status = -1;
|
||||
m_busy = false;
|
||||
@@ -427,6 +427,7 @@ void DebuggerManager::init()
|
||||
|
||||
setStatus(DebuggerProcessNotReady);
|
||||
gdbEngine = createGdbEngine(this);
|
||||
if (arguments.contains(QLatin1String("-enable-cdb")))
|
||||
winEngine = createWinEngine(this);
|
||||
scriptEngine = createScriptEngine(this);
|
||||
setDebuggerType(GdbDebugger);
|
||||
|
@@ -178,7 +178,7 @@ class DebuggerManager : public QObject,
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DebuggerManager();
|
||||
DebuggerManager(const QStringList &arguments);
|
||||
~DebuggerManager();
|
||||
|
||||
IDebuggerManagerAccessForEngines *engineInterface();
|
||||
@@ -341,7 +341,7 @@ public:
|
||||
bool m_useTerminal;
|
||||
|
||||
private:
|
||||
void init();
|
||||
void init(const QStringList &arguments);
|
||||
void setDebuggerType(DebuggerType type);
|
||||
void runTest(const QString &fileName);
|
||||
QDockWidget *createDockForWidget(QWidget *widget);
|
||||
|
@@ -470,7 +470,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
||||
Q_UNUSED(arguments);
|
||||
Q_UNUSED(errorMessage);
|
||||
|
||||
m_manager = new DebuggerManager;
|
||||
m_manager = new DebuggerManager(arguments);
|
||||
|
||||
ICore *core = ICore::instance();
|
||||
QTC_ASSERT(core, return false);
|
||||
|
@@ -718,7 +718,7 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const
|
||||
break;
|
||||
}
|
||||
case Qt::ToolTipRole: {
|
||||
result = node->path();
|
||||
result = QDir::toNativeSeparators(node->path());
|
||||
break;
|
||||
}
|
||||
case Qt::DecorationRole: {
|
||||
|
@@ -559,7 +559,7 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
static_cast<int>(0.7 * textColor.blue() + 0.3 * backgroundColor.blue()));
|
||||
painter->setPen(mix);
|
||||
|
||||
QString directory = index.data(TaskModel::File).toString();
|
||||
const QString directory = QDir::toNativeSeparators(index.data(TaskModel::File).toString());
|
||||
int secondBaseLine = 2 + fm.ascent() + opt.rect.top() + height + leading; //opt.rect.top() + fm.ascent() + fm.height() + 6;
|
||||
if (index.data(TaskModel::FileNotFound).toBool()) {
|
||||
QString fileNotFound = tr("File not found: %1").arg(directory);
|
||||
|
@@ -140,14 +140,14 @@ ProjectExplorer::Project* Qt4Manager::openProject(const QString &fileName)
|
||||
QString canonicalFilePath = QFileInfo(fileName).canonicalFilePath();
|
||||
|
||||
if (canonicalFilePath.isEmpty()) {
|
||||
messageManager->printToOutputPane(tr("Failed opening project '%1': Project file does not exist").arg(canonicalFilePath));
|
||||
messageManager->printToOutputPane(tr("Failed opening project '%1': Project file does not exist").arg(QDir::toNativeSeparators(canonicalFilePath)));
|
||||
messageManager->displayStatusBarMessage(tr("Failed opening project"), 5000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
foreach (ProjectExplorer::Project *pi, projectExplorer()->session()->projects()) {
|
||||
if (canonicalFilePath == pi->file()->fileName()) {
|
||||
messageManager->printToOutputPane(tr("Failed opening project '%1': Project already open").arg(canonicalFilePath));
|
||||
messageManager->printToOutputPane(tr("Failed opening project '%1': Project already open").arg(QDir::toNativeSeparators(canonicalFilePath)));
|
||||
messageManager->displayStatusBarMessage(tr("Failed opening project"), 5000);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user