diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc index b6b257d55ff..e4942d1a828 100644 --- a/doc/addressbook-sdk.qdoc +++ b/doc/addressbook-sdk.qdoc @@ -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 + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index 198aad2ed46..e47ed3eb9b5 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -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 @@ -975,17 +977,17 @@ \o Compiler \o Debugger Engine \row - \o Linux, Unixes, Mac OS - \o gcc - \o GNU Symbolic Debugger (gdb) + \o Linux, Unixes, Mac OS + \o gcc + \o GNU Symbolic Debugger (gdb) \row - \o Windows/MinGW - \o gcc - \o GNU Symbolic Debugger (gdb) + \o Windows/MinGW + \o gcc + \o GNU Symbolic Debugger (gdb) \row - \o Windows - \o Microsoft Visual C++ Compiler - \o Debugging Tools for Windows / Microsoft Console Debugger (CDB) + \o Windows + \o Microsoft Visual C++ Compiler + \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}. */ diff --git a/src/libs/extensionsystem/plugindetailsview.cpp b/src/libs/extensionsystem/plugindetailsview.cpp index bb4ffb6b0ba..e9e90f6e82d 100644 --- a/src/libs/extensionsystem/plugindetailsview.cpp +++ b/src/libs/extensionsystem/plugindetailsview.cpp @@ -30,6 +30,8 @@ #include "plugindetailsview.h" #include "ui_plugindetailsview.h" +#include + /*! \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()); diff --git a/src/libs/extensionsystem/pluginview.cpp b/src/libs/extensionsystem/pluginview.cpp index 3747e86c53f..e467f04db27 100644 --- a/src/libs/extensionsystem/pluginview.cpp +++ b/src/libs/extensionsystem/pluginview.cpp @@ -33,6 +33,7 @@ #include "pluginspec.h" #include "ui_pluginview.h" +#include #include #include #include @@ -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); diff --git a/src/plugins/coreplugin/welcomemode.cpp b/src/plugins/coreplugin/welcomemode.cpp index 05fd51f15af..52e761bc72b 100644 --- a/src/plugins/coreplugin/welcomemode.cpp +++ b/src/plugins/coreplugin/welcomemode.cpp @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -239,7 +240,7 @@ void WelcomeMode::updateWelcomePage(const WelcomePageData &welcomePageData) for( it = welcomePageData.projectList.constBegin(); it != end; ++it) { const QFileInfo fi((*it).first); str << "
  • " << (*it).second << "

  • \n"; + << QDir::toNativeSeparators(fi.absolutePath()) << "\">" << (*it).second << "

    \n"; } projectHtml.replace(QLatin1String(""), projects); } diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp index a89c404dbda..1022fc1374f 100644 --- a/src/plugins/cppeditor/cpphoverhandler.cpp +++ b/src/plugins/cppeditor/cpphoverhandler.cpp @@ -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; } } diff --git a/src/plugins/debugger/Debugger.pluginspec b/src/plugins/debugger/Debugger.pluginspec index 497520d69aa..da8d04450ff 100644 --- a/src/plugins/debugger/Debugger.pluginspec +++ b/src/plugins/debugger/Debugger.pluginspec @@ -24,4 +24,7 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. + + + diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp index 5f8f07aed0e..fc5f3371f57 100644 --- a/src/plugins/debugger/debuggermanager.cpp +++ b/src/plugins/debugger/debuggermanager.cpp @@ -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,7 +427,8 @@ void DebuggerManager::init() setStatus(DebuggerProcessNotReady); gdbEngine = createGdbEngine(this); - winEngine = createWinEngine(this); + if (arguments.contains(QLatin1String("-enable-cdb"))) + winEngine = createWinEngine(this); scriptEngine = createScriptEngine(this); setDebuggerType(GdbDebugger); if (Debugger::Constants::Internal::debug) diff --git a/src/plugins/debugger/debuggermanager.h b/src/plugins/debugger/debuggermanager.h index b9709a68fa5..b6cf4b78f40 100644 --- a/src/plugins/debugger/debuggermanager.h +++ b/src/plugins/debugger/debuggermanager.h @@ -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); diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 8a1cb6baca7..90cb7bd1f79 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -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); diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp index f784daf5905..c6a1ba7b30b 100644 --- a/src/plugins/projectexplorer/projectmodels.cpp +++ b/src/plugins/projectexplorer/projectmodels.cpp @@ -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: { diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp index 19636975c99..e3a431be859 100644 --- a/src/plugins/projectexplorer/taskwindow.cpp +++ b/src/plugins/projectexplorer/taskwindow.cpp @@ -559,7 +559,7 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, static_cast(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); diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.cpp b/src/plugins/qt4projectmanager/qt4projectmanager.cpp index df1d613dc30..0f460242b11 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.cpp +++ b/src/plugins/qt4projectmanager/qt4projectmanager.cpp @@ -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; }