...
 
Commits (41)
Qt Creator 2.1.0
Qt Creator 2.0.81
===============
Qt Creator is a crossplatform C++ IDE for development with the Qt framework.
......
......@@ -27,7 +27,7 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" </div>\n" \
" <div id=\"shortCut\">\n" \
" <ul>\n" \
" <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt Creator 2.1.0 </a></span></li>\n" \
" <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt Creator 2.0.81 </a></span></li>\n" \
" <li class=\"shortCut-topleft-active\"><a href=\"http://qt.nokia.com/doc/\">ALL VERSIONS" \
" </a></li>\n" \
" </ul>\n" \
......
......@@ -270,26 +270,15 @@
\section1 Debuggers
Qt Creator does not include a debugger. It provides a debugger plugin that acts
as an interface between the Qt Creator core and external native debuggers:
\list
\o GNU Symbolic Debugger (gdb)
\o Microsoft Console Debugger (CDB)
\o internal Java Script debugger
\endlist
Qt Creator provides means to help you with debugging your application.
It interfaces the GNU Symbolic Debugger (gdb) and the Microsoft Console
Debugger (CDB) to debug native C++ applications and an internal debugger
for Java Script. This includes the ability to connect mobile devices to
your development PC and debug applications running on the devices.
Qt Creator displays the raw information provided by the native debuggers
in a clear and concise manner with the goal to simplify the debugging process
as much as possible without losing the power of the native debuggers.
You can use the native debuggers to debug the C++ language.
You can connect mobile devices to your development PC and debug processes
running on the devices.
*/
......@@ -6268,7 +6257,7 @@
To move forward in the location history, press \key {Alt+Right}
(\key {Cmd+Opt+Right} on Mac OS). To move backward, press \key {Alt+Left}
(\key {Cmd+Opt+Right} on Mac OS). For example, if you use the \gui Locator
(\key {Cmd+Opt+Left} on Mac OS). For example, if you use the \gui Locator
to jump to a symbol in the same file, you can jump back to your original
location in that file by pressing \key {Alt+Left}.
......
......@@ -19,12 +19,12 @@ sources.fileextensions = "qtcreator.qdoc addressbook-sdk.qdoc"
qhp.projects = QtCreator
qhp.QtCreator.file = qtcreator.qhp
qhp.QtCreator.namespace = com.nokia.qtcreator.210
qhp.QtCreator.namespace = com.nokia.qtcreator.2081
qhp.QtCreator.virtualFolder = doc
qhp.QtCreator.indexTitle = Qt Creator
qhp.QtCreator.filterAttributes = qtcreator 2.1.0
qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 2.1.0
qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 2.1.0
qhp.QtCreator.filterAttributes = qtcreator 2.0.81
qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 2.0.81
qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 2.0.81
qhp.QtCreator.indexRoot =
qhp.QtCreator.extraFiles = \
style/style.css \
......
......@@ -257,6 +257,7 @@ class SubItem:
class Children:
def __init__(self, d, numChild = 1, childType = None, childNumChild = None):
# Note: childNumChild == 0 does not work.
self.d = d
self.numChild = numChild
self.childType = childType
......@@ -613,7 +614,7 @@ movableTypes = set([
"QFileInfo", "QFixed", "QFixedPoint", "QFixedSize",
"QHashDummyValue",
"QIcon", "QImage",
"QLine", "QLineF", "QLatin1Char", "QLocal",
"QLine", "QLineF", "QLatin1Char", "QLocale",
"QMatrix", "QModelIndex",
"QPoint", "QPointF", "QPen", "QPersistentModelIndex",
"QResourceRoot", "QRect", "QRectF", "QRegExp",
......@@ -1326,6 +1327,9 @@ class Dumper:
nsStrippedType = self.stripNamespaceFromType(
typedefStrippedType).replace("::", "__")
# Is this derived from QObject?
hasMetaObject = False
#warn(" STRIPPED: %s" % nsStrippedType)
#warn(" DUMPERS: %s" % self.dumpers)
#warn(" DUMPERS: %s" % (nsStrippedType in self.dumpers))
......
......@@ -485,15 +485,15 @@ def qdump__QLocale(d, item):
d.putStringValue(call(item.value, "name()"))
d.putNumChild(8)
if d.isExpanded(item):
with Children(d, 1, lookupType(d.ns + "QChar"), 0):
with Children(d, 1, lookupType(d.ns + "QChar")):
d.putCallItem("country", item, "country()")
d.putCallItem("language", item, "language()")
d.putCallItem("measurementSystem", item, "measurementSystem()")
d.putCallItem("numberOptions", item, "numberOptions()")
d.putCallItem("timeFormat_(short)", item,
"timeFormat(" + d.ns + "QLocale::ShortFormat)")
"timeFormat('" + d.ns + "QLocale::ShortFormat')")
d.putCallItem("timeFormat_(long)", item,
"timeFormat(" + d.ns + "QLocale::LongFormat)")
"timeFormat('" + d.ns + "QLocale::LongFormat')")
d.putCallItem("decimalPoint", item, "decimalPoint()")
d.putCallItem("exponential", item, "exponential()")
d.putCallItem("percent", item, "percent()")
......@@ -578,9 +578,6 @@ def extractCString(table, offset):
return result
def qdump__QWidget(d, item):
qdump__QObject(d, item)
def qdump__QObject(d, item):
#warn("OBJECT: %s " % item.value)
staticMetaObject = item.value["staticMetaObject"]
......@@ -623,9 +620,8 @@ def qdump__QObject(d, item):
# Properties.
with SubItem(d):
#propertyCount = metaData[6]
# FIXME: Replace with plain memory accesses.
propertyCount = call(mo, "propertyCount()")
propertyCount = metaData[6]
#propertyCount = call(mo, "propertyCount()")
#warn("PROPERTY COUNT: %s" % propertyCount)
propertyData = metaData[7]
d.putName("properties")
......@@ -1811,6 +1807,8 @@ def qdump__std__set(d, item):
def qdump__std__string(d, item):
data = item.value["_M_dataplus"]["_M_p"]
baseType = item.value.type.unqualified().strip_typedefs()
if baseType.code == gdb.TYPE_CODE_REF:
baseType = baseType.target().unqualified().strip_typedefs()
charType = baseType.template_argument(0)
repType = lookupType("%s::_Rep" % baseType).pointer()
rep = (data.cast(repType) - 1).dereference()
......@@ -1857,10 +1855,21 @@ def qdump__std__string(d, item):
def qdump__std__vector(d, item):
impl = item.value["_M_impl"]
start = impl["_M_start"]
finish = impl["_M_finish"]
type = item.value.type.template_argument(0)
alloc = impl["_M_end_of_storage"]
size = finish - start
isBool = str(type) == 'bool'
if isBool:
start = impl["_M_start"]["_M_p"]
finish = impl["_M_finish"]["_M_p"]
# FIXME: 32 is sizeof(unsigned long) * CHAR_BIT
storagesize = 32
size = (finish - start) * storagesize
size += impl["_M_finish"]["_M_offset"]
size -= impl["_M_start"]["_M_offset"]
else:
start = impl["_M_start"]
finish = impl["_M_finish"]
size = finish - start
check(0 <= size and size <= 1000 * 1000 * 1000)
check(finish <= alloc)
......@@ -1871,11 +1880,18 @@ def qdump__std__vector(d, item):
d.putItemCount(size)
d.putNumChild(size)
if d.isExpanded(item):
with Children(d, [size, 10000], item.value.type.template_argument(0)):
p = start
for i in d.childRange():
d.putItem(Item(p.dereference(), item.iname, i))
p += 1
if isBool:
with Children(d, [size, 10000], type):
for i in d.childRange():
q = start + i / storagesize
data = (q.dereference() >> (i % storagesize)) & 1
d.putBoolItem(str(i), select(data, "true", "false"))
else:
with Children(d, [size, 10000], type):
p = start
for i in d.childRange():
d.putItem(Item(p.dereference(), item.iname, i))
p += 1
def qdump__string(d, item):
......
......@@ -36,11 +36,11 @@ leave room for the Qt 4 target page.
-->
<wizard version="1" kind="project"
class="qt4project" firstpage="10"
id="QmlRuntimePlugin" category="F.Projects">
id="QmlExtensionPlugin" category="F.Projects">
<icon>lib.png</icon>
<description>Creates a C++ plugin to extend the funtionality of the QML runtime.</description>
<displayname>QML Runtime Plug-in</displayname>
<displaycategory>QML Runtime Plug-in</displaycategory>
<description>Creates a C++ plugin that makes it possible to offer extensions that can be loaded dynamically into applications using the QDeclarativeEngine class.</description>
<displayname>Custom QML Extension Plugin</displayname>
<displaycategory>QML Extension Plugin</displaycategory>
<files>
<file source="qmldir" target="qmldir"/>
<file source="plugin.h" target="%ProjectName%.h"/>
......@@ -50,7 +50,7 @@ leave room for the Qt 4 target page.
<file source="project.pro" target="%ProjectName%.pro" openproject="true"/>
</files>
<!-- Create a 2nd wizard page with parameters -->
<fieldpagetitle>QML Runtime Plug-in Parameters</fieldpagetitle>
<fieldpagetitle>Custom QML Extension Plugin Parameters</fieldpagetitle>
<fields>
<field mandatory="false" name="ObjectName">
<fieldcontrol class="QLineEdit" validator='^[A-Za-z0-9_]+$' defaulttext="ExampleObject"/>
......
......@@ -6410,7 +6410,7 @@ Vous pouvez décider entre attendre plus longtemps ou mettre fin au débogage.</
</message>
<message>
<location filename="../../../src/plugins/designer/codemodelhelpers.cpp" line="+129"/>
<source>The generated header of the form &apos;%1&apos; could be found.
<source>The generated header of the form &apos;%1&apos; could not be found.
Rebuilding the project might help.</source>
<translation type="unfinished">Impossible de trouver un en-tête généré pour l&apos;interface graphique %1.
Regénérer le projet peut résoudre ce problème.</translation>
......
......@@ -9113,7 +9113,7 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej.</translation>
</message>
<message>
<location filename="../../../src/plugins/designer/codemodelhelpers.cpp" line="+129"/>
<source>The generated header of the form &apos;%1&apos; could be found.
<source>The generated header of the form &apos;%1&apos; could not be found.
Rebuilding the project might help.</source>
<translation>Nie można odnaleźć wygenerowanego pliku nagłówkowego dla formularza &quot;%1&quot;.
Spróbuj ponownie przebudować projekt.</translation>
......
This diff is collapsed.
include(../../../qtcreator.pri)
LANGUAGES = de ja pl ru
LANGUAGES = de ja pl ru zh_CN
#LANGUAGES = cs es fr hu it sl
# var, prepend, append
......@@ -32,7 +32,7 @@ QMAKE_EXTRA_TARGETS += extract
files = $$files($$PWD/*_??.ts) $$PWD/qtcreator_untranslated.ts
for(file, files) {
lang = $$replace(file, .*_(.*)\\.ts, \\1)
lang = $$replace(file, .*_([^/]*)\\.ts, \\1)
v = ts-$${lang}.commands
$$v = cd $$IDE_SOURCE_TREE && $$LUPDATE src share/qtcreator/qmldesigner $$MIME_TR_H $$CUSTOMWIZARD_TR_H -ts $$file
v = ts-$${lang}.depends
......
......@@ -219,8 +219,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<key>CFBundleIdentifier</key>
<string>com.nokia.qtcreator</string>
<key>CFBundleVersion</key>
<string>2.1.0</string>
<string>2.0.81</string>
<key>CFBundleShortVersionString</key>
<string>2.1.0</string>
<string>2.0.81</string>
</dict>
</plist>
<plugin name="BinEditor" version="2.1.0" compatVersion="2.1.0">
<plugin name="BinEditor" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,7 +14,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Binary editor component.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="2.1.0"/>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="Core" version="2.0.81"/>
<dependency name="TextEditor" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="Bookmarks" version="2.1.0" compatVersion="2.1.0">
<plugin name="Bookmarks" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,8 +14,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Bookmarks in text editors.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="ProjectExplorer" version="2.1.0"/>
<dependency name="Core" version="2.1.0"/>
<dependency name="TextEditor" version="2.0.81"/>
<dependency name="ProjectExplorer" version="2.0.81"/>
<dependency name="Core" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="CMakeProjectManager" version="2.1.0" compatVersion="2.1.0">
<plugin name="CMakeProjectManager" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>CMake support</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="ProjectExplorer" version="2.1.0"/>
<dependency name="CppTools" version="2.1.0"/>
<dependency name="CppEditor" version="2.1.0"/>
<dependency name="TextEditor" version="2.0.81"/>
<dependency name="ProjectExplorer" version="2.0.81"/>
<dependency name="CppTools" version="2.0.81"/>
<dependency name="CppEditor" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="Core" version="2.1.0" compatVersion="2.1.0">
<plugin name="Core" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......
......@@ -36,8 +36,8 @@ namespace Core {
namespace Constants {
#define IDE_VERSION_MAJOR 2
#define IDE_VERSION_MINOR 1
#define IDE_VERSION_RELEASE 0
#define IDE_VERSION_MINOR 0
#define IDE_VERSION_RELEASE 81
#define STRINGIFY_INTERNAL(x) #x
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
......
......@@ -1628,7 +1628,10 @@ void EditorManager::showPopupOrSelectDocument() const
if (QApplication::keyboardModifiers() == Qt::NoModifier) {
windowPopup()->selectAndHide();
} else {
const QPoint p(mapToGlobal(QPoint(0, 0)));
// EditorManager is invisible when invoked from Design Mode.
const QPoint p = isVisible() ?
mapToGlobal(QPoint(0, 0)) :
m_d->m_core->mainWindow()->mapToGlobal(QPoint(0, 0));
windowPopup()->move((width()-m_d->m_windowPopup->width())/2 + p.x(),
(height()-m_d->m_windowPopup->height())/2 + p.y());
windowPopup()->setVisible(true);
......
<plugin name="CodePaster" version="2.1.0" compatVersion="2.1.0">
<plugin name="CodePaster" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -13,8 +13,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Codepaster plugin for pushing/fetching diff from server</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="ProjectExplorer" version="2.1.0"/>
<dependency name="Core" version="2.1.0"/>
<dependency name="TextEditor" version="2.0.81"/>
<dependency name="ProjectExplorer" version="2.0.81"/>
<dependency name="Core" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="CppEditor" version="2.1.0" compatVersion="2.1.0">
<plugin name="CppEditor" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,8 +14,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>C/C++ editor component.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="2.1.0"/>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="CppTools" version="2.1.0"/>
<dependency name="Core" version="2.0.81"/>
<dependency name="TextEditor" version="2.0.81"/>
<dependency name="CppTools" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="CppTools" version="2.1.0" compatVersion="2.1.0">
<plugin name="CppTools" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,8 +14,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Tools for analyzing C/C++ code.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="ProjectExplorer" version="2.1.0"/>
<dependency name="Locator" version="2.1.0"/>
<dependency name="TextEditor" version="2.0.81"/>
<dependency name="ProjectExplorer" version="2.0.81"/>
<dependency name="Locator" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="CVS" version="2.1.0" compatVersion="2.1.0">
<plugin name="CVS" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>CVS integration.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="ProjectExplorer" version="2.1.0"/>
<dependency name="Core" version="2.1.0"/>
<dependency name="VCSBase" version="2.1.0"/>
<dependency name="TextEditor" version="2.0.81"/>
<dependency name="ProjectExplorer" version="2.0.81"/>
<dependency name="Core" version="2.0.81"/>
<dependency name="VCSBase" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="Debugger" version="2.1.0" compatVersion="2.1.0">
<plugin name="Debugger" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,10 +14,10 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Debugger integration.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="CppEditor" version="2.1.0"/><!-- Debugger plugin adds items to the editor's context menu -->
<dependency name="ProjectExplorer" version="2.1.0"/>
<dependency name="Core" version="2.1.0"/>
<dependency name="Find" version="2.1.0"/>
<dependency name="CppEditor" version="2.0.81"/><!-- Debugger plugin adds items to the editor's context menu -->
<dependency name="ProjectExplorer" version="2.0.81"/>
<dependency name="Core" version="2.0.81"/>
<dependency name="Find" version="2.0.81"/>
</dependencyList>
<argumentList>
<argument name="-disable-cdb">Disable Cdb debugger engine</argument>
......
......@@ -391,6 +391,7 @@ void CdbDebugEngine::startDebugger(const QSharedPointer<DebuggerStartParameters>
dumperEnabled = false;
}
}
m_d->m_dumper->setFastSymbolResolution(m_d->m_options->fastLoadDebuggingHelpers);
m_d->m_dumper->reset(dumperLibName, dumperEnabled);
setState(InferiorStarting, Q_FUNC_INFO, __LINE__);
......
......@@ -307,7 +307,8 @@ CdbDumperHelper::CdbDumperHelper(DebuggerManager *manager,
m_outBufferSize(0),
m_buffer(0),
m_dumperCallThread(0),
m_goCommand(goCommand(m_dumperCallThread))
m_goCommand(goCommand(m_dumperCallThread)),
m_fastSymbolResolution(true)
{
}
......@@ -435,19 +436,29 @@ static inline bool getSymbolAddress(CIDebugSymbols *sg,
bool CdbDumperHelper::initResolveSymbols(QString *errorMessage)
{
// Resolve the symbols we need (potentially namespaced).
// Resolve the symbols we need.
// There is a 'qDumpInBuffer' in QtCore as well.
if (loadDebug)
qDebug() << Q_FUNC_INFO;
m_dumpObjectSymbol = QLatin1String("*qDumpObjectData440");
QString inBufferSymbol = QLatin1String("*qDumpInBuffer");
QString outBufferSymbol = QLatin1String("*qDumpOutBuffer");
bool rc;
const QString dumperModuleName = QLatin1String(dumperModuleNameC);
bool rc = resolveSymbol(m_coreEngine->interfaces().debugSymbols, &m_dumpObjectSymbol, errorMessage) == ResolveSymbolOk
&& resolveSymbol(m_coreEngine->interfaces().debugSymbols, dumperModuleName, &inBufferSymbol, errorMessage) == ResolveSymbolOk
&& resolveSymbol(m_coreEngine->interfaces().debugSymbols, dumperModuleName, &outBufferSymbol, errorMessage) == ResolveSymbolOk;
if (!rc)
return false;
QString inBufferSymbol, outBufferSymbol;
if (m_fastSymbolResolution) {
// Symbols in the debugging helpers are never namespaced.
m_dumpObjectSymbol = dumperModuleName + QLatin1String("!qDumpObjectData440");
inBufferSymbol = dumperModuleName + QLatin1String("!qDumpInBuffer");
outBufferSymbol = dumperModuleName + QLatin1String("!qDumpOutBuffer");
} else {
// Classical approach of loading the dumper symbols. Takes some time though.
m_dumpObjectSymbol = QLatin1String("*qDumpObjectData440");
inBufferSymbol = QLatin1String("*qDumpInBuffer");
outBufferSymbol = QLatin1String("*qDumpOutBuffer");
bool rc = resolveSymbol(m_coreEngine->interfaces().debugSymbols, &m_dumpObjectSymbol, errorMessage) == ResolveSymbolOk
&& resolveSymbol(m_coreEngine->interfaces().debugSymbols, dumperModuleName, &inBufferSymbol, errorMessage) == ResolveSymbolOk
&& resolveSymbol(m_coreEngine->interfaces().debugSymbols, dumperModuleName, &outBufferSymbol, errorMessage) == ResolveSymbolOk;
if (!rc)
return false;
}
// Determine buffer addresses, sizes and alloc buffer
rc = getSymbolAddress(m_coreEngine->interfaces().debugSymbols, inBufferSymbol, &m_inBufferAddress, &m_inBufferSize, errorMessage)
&& getSymbolAddress(m_coreEngine->interfaces().debugSymbols, outBufferSymbol, &m_outBufferAddress, &m_outBufferSize, errorMessage);
......
......@@ -92,6 +92,8 @@ public:
State state() const { return m_state; }
bool isEnabled() const { return m_state != Disabled; }
void setFastSymbolResolution(bool b) { m_fastSymbolResolution = b; }
// Disable in case of a debuggee crash.
void disable();
......@@ -156,6 +158,7 @@ private:
QtDumperHelper m_helper;
unsigned long m_dumperCallThread;
QString m_goCommand;
bool m_fastSymbolResolution;
};
} // namespace Internal
......
......@@ -40,13 +40,15 @@ static const char *pathKeyC = "Path";
static const char *symbolPathsKeyC = "SymbolPaths";
static const char *sourcePathsKeyC = "SourcePaths";
static const char *verboseSymbolLoadingKeyC = "VerboseSymbolLoading";
static const char *fastLoadDebuggingHelpersKeyC = "FastLoadDebuggingHelpers";
namespace Debugger {
namespace Internal {
CdbOptions::CdbOptions() :
enabled(false),
verboseSymbolLoading(false)
verboseSymbolLoading(false),
fastLoadDebuggingHelpers(true)
{
}
......@@ -54,6 +56,7 @@ void CdbOptions::clear()
{
enabled = false;
verboseSymbolLoading = false;
fastLoadDebuggingHelpers = true;
path.clear();
}
......@@ -74,6 +77,7 @@ void CdbOptions::fromSettings(const QSettings *s)
symbolPaths = s->value(keyRoot + QLatin1String(symbolPathsKeyC), QStringList()).toStringList();
sourcePaths = s->value(keyRoot + QLatin1String(sourcePathsKeyC), QStringList()).toStringList();
verboseSymbolLoading = s->value(keyRoot + QLatin1String(verboseSymbolLoadingKeyC), false).toBool();
fastLoadDebuggingHelpers = s->value(keyRoot + QLatin1String(fastLoadDebuggingHelpersKeyC), true).toBool();
}
void CdbOptions::toSettings(QSettings *s) const
......@@ -84,6 +88,7 @@ void CdbOptions::toSettings(QSettings *s) const
s->setValue(QLatin1String(symbolPathsKeyC), symbolPaths);
s->setValue(QLatin1String(sourcePathsKeyC), sourcePaths);
s->setValue(QLatin1String(verboseSymbolLoadingKeyC), verboseSymbolLoading);
s->setValue(QLatin1String(fastLoadDebuggingHelpersKeyC), fastLoadDebuggingHelpers);
s->endGroup();
}
......@@ -96,6 +101,8 @@ unsigned CdbOptions::compare(const CdbOptions &rhs) const
rc |= DebuggerPathsChanged;
if (verboseSymbolLoading != rhs.verboseSymbolLoading)
rc |= SymbolOptionsChanged;
if (fastLoadDebuggingHelpers != rhs.fastLoadDebuggingHelpers)
rc |= FastLoadDebuggingHelpersChanged;
return rc;
}
......
......@@ -51,7 +51,8 @@ public:
// A set of flags for comparison function.
enum ChangeFlags { InitializationOptionsChanged = 0x1,
DebuggerPathsChanged = 0x2,
SymbolOptionsChanged = 0x4 };
SymbolOptionsChanged = 0x4,
FastLoadDebuggingHelpersChanged = 0x8 };
unsigned compare(const CdbOptions &s) const;
bool enabled;
......@@ -59,6 +60,7 @@ public:
QStringList symbolPaths;
QStringList sourcePaths;
bool verboseSymbolLoading;
bool fastLoadDebuggingHelpers;
};
inline bool operator==(const CdbOptions &s1, const CdbOptions &s2)
......
......@@ -85,7 +85,7 @@ void CdbOptionsPageWidget::setOptions(CdbOptions &o)
m_ui.symbolPathListEditor->setPathList(o.symbolPaths);
m_ui.sourcePathListEditor->setPathList(o.sourcePaths);
m_ui.verboseSymbolLoadingCheckBox->setChecked(o.verboseSymbolLoading);
m_ui.fastLoadDebuggingHelpersCheckBox->setChecked(o.fastLoadDebuggingHelpers);
}
CdbOptions CdbOptionsPageWidget::options() const
......@@ -96,6 +96,7 @@ CdbOptions CdbOptionsPageWidget::options() const
rc.symbolPaths = m_ui.symbolPathListEditor->pathList();
rc.sourcePaths = m_ui.sourcePathListEditor->pathList();
rc.verboseSymbolLoading = m_ui.verboseSymbolLoadingCheckBox->isChecked();
rc.fastLoadDebuggingHelpers = m_ui.fastLoadDebuggingHelpersCheckBox->isChecked();
return rc;
}
......@@ -132,7 +133,8 @@ QString CdbOptionsPageWidget::searchKeywords() const
QString rc;
QTextStream(&rc) << m_ui.pathLabel->text() << ' ' << m_ui.symbolPathLabel->text()
<< ' ' << m_ui.sourcePathLabel->text()
<< ' ' << m_ui.verboseSymbolLoadingCheckBox->text();
<< ' ' << m_ui.verboseSymbolLoadingCheckBox->text()
<< ' ' << m_ui.fastLoadDebuggingHelpersCheckBox->text();
rc.remove(QLatin1Char('&'));
return rc;
}
......
......@@ -85,6 +85,9 @@
<string>Other Options</string>
</property>
<layout class="QFormLayout" name="formLayout_3">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="verboseSymbolLoadingCheckBox">
<property name="text">
......@@ -92,6 +95,13 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="fastLoadDebuggingHelpersCheckBox">
<property name="text">
<string>Fast loading of debugging helpers</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
......@@ -153,6 +153,11 @@ DebuggerUISwitcher::~DebuggerUISwitcher()
delete d;
}
QStringList DebuggerUISwitcher::supportedLanguages() const
{
return d->m_languages;
}
void DebuggerUISwitcher::addMenuAction(Core::Command *command, const QString &langName,
const QString &group)
{
......
......@@ -77,6 +77,8 @@ public:
void addMenuAction(Core::Command *command, const QString &langName,
const QString &group = QString());
QStringList supportedLanguages() const;
// Changes the active language UI to the one specified by langName.
// Does nothing if automatic switching is toggled off from settings.
void setActiveLanguage(const QString &langName);
......
......@@ -442,10 +442,15 @@ void GdbEngine::handleResponse(const QByteArray &buff)
// 7.0.x, there was a *-created instead.
int progress = m_progress->progressValue();
m_progress->setProgressValue(qMin(70, progress + 1));
// 7.1.50 has thread-group-started,id="i1",pid="3529"
QByteArray id = result.findChild("id").data();
showStatusMessage(tr("Thread group %1 created.").arg(_(id)), 1000);
showStatusMessage(tr("Thread group %1 created").arg(_(id)), 1000);
int pid = id.toInt();
if (pid != inferiorPid())
if (!pid) {
id = result.findChild("pid").data();
pid = id.toInt();
}
if (pid)
handleInferiorPidChanged(pid);
} else if (asyncClass == "thread-created") {
//"{id="1",group-id="28902"}"
......
......@@ -39,6 +39,9 @@
#include <QtCore/QFileInfo>
#include <QtCore/QDir>
#include <QtGui/QToolTip>
#include <QtGui/QFontMetrics>
namespace Debugger {
namespace Internal {
......@@ -76,12 +79,14 @@ QString StackFrame::toString() const
QString StackFrame::toToolTip() const
{
const QString filePath = QDir::toNativeSeparators(file);
QString res;
QTextStream str(&res);
str << "<html><body><table>"
<< "<tr><td>" << StackHandler::tr("Address:") << "</td><td>" << address << "</td></tr>"
<< "<tr><td>" << StackHandler::tr("Function:") << "</td><td>" << function << "</td></tr>"
<< "<tr><td>" << StackHandler::tr("File:") << "</td><td>" << QDir::toNativeSeparators(file) << "</td></tr>"
<< "<tr><td>" << StackHandler::tr("File:") << "</td><td width="
<< QFontMetrics(QToolTip::font()).width(filePath) << ">" << filePath << "</td></tr>"
<< "<tr><td>" << StackHandler::tr("Line:") << "</td><td>" << line << "</td></tr>"
<< "<tr><td>" << StackHandler::tr("From:") << "</td><td>" << from << "</td></tr>"
<< "<tr><td>" << StackHandler::tr("To:") << "</td><td>" << to << "</td></tr>"
......
<plugin name="Designer" version="2.1.0" compatVersion="2.1.0">
<plugin name="Designer" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,8 +14,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Qt Designer integration.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="2.1.0"/>
<dependency name="Core" version="2.0.81"/>
<!-- For compiling with CPP support enabled -->
<dependency name="CppEditor" version="2.1.0"/>
<dependency name="CppEditor" version="2.0.81"/>
</dependencyList>
</plugin>
......@@ -126,7 +126,7 @@ bool navigateToSlot(const QString &uiFileName,
// Find the generated header.
const QString generatedHeaderFile = generatedHeaderOf(uiFileName);
if (generatedHeaderFile.isEmpty()) {
*errorMessage = QCoreApplication::translate("Designer", "The generated header of the form '%1' could be found.\nRebuilding the project might help.").arg(uiFileName);
*errorMessage = QCoreApplication::translate("Designer", "The generated header of the form '%1' could not be found.\nRebuilding the project might help.").arg(uiFileName);
return false;
}
const CPlusPlus::Snapshot snapshot = CppTools::CppModelManagerInterface::instance()->snapshot();
......
<plugin name="FakeVim" version="2.1.0" compatVersion="2.1.0">
<plugin name="FakeVim" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -13,9 +13,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>VI-style keyboard navigation.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="CppEditor" version="2.1.0"/><!-- Plugin adds items to the editor's context menu -->
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="ProjectExplorer" version="2.1.0"/>
<dependency name="Core" version="2.1.0"/>
<dependency name="CppEditor" version="2.0.81"/><!-- Plugin adds items to the editor's context menu -->
<dependency name="TextEditor" version="2.0.81"/>
<dependency name="ProjectExplorer" version="2.0.81"/>
<dependency name="Core" version="2.0.81"/>
</dependencyList>
</plugin>
......@@ -1867,6 +1867,8 @@ EventResult FakeVimHandler::Private::handleCommandMode(const Input &input)
}
} else if (input.is('`')) {
m_subsubmode = BackTickSubSubMode;
if (m_submode != NoSubMode)
m_movetype = MoveLineWise;
} else if (input.is('#') || input.is('*')) {
// FIXME: That's not proper vim behaviour
QTextCursor tc = m_tc;
......@@ -1888,6 +1890,8 @@ EventResult FakeVimHandler::Private::handleCommandMode(const Input &input)
//updateMiniBuffer();
} else if (input.is('\'')) {
m_subsubmode = TickSubSubMode;
if (m_submode != NoSubMode)
m_movetype = MoveLineWise;
} else if (input.is('|')) {
moveToStartOfLine();
moveRight(qMin(count(), rightDist()) - 1);
......
<plugin name="Find" version="2.1.0" compatVersion="2.1.0">
<plugin name="Find" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,6 +14,6 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Provides the find widget and the hooks for find implementations.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="2.1.0"/>
<dependency name="Core" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="GenericProjectManager" version="2.1.0" compatVersion="2.1.0">
<plugin name="GenericProjectManager" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Generic support</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="ProjectExplorer" version="2.1.0"/>
<dependency name="CppTools" version="2.1.0"/>
<dependency name="CppEditor" version="2.1.0"/>
<dependency name="TextEditor" version="2.0.81"/>
<dependency name="ProjectExplorer" version="2.0.81"/>
<dependency name="CppTools" version="2.0.81"/>
<dependency name="CppEditor" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="ScmGit" version="2.1.0" compatVersion="2.1.0">
<plugin name="ScmGit" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Git integration.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="ProjectExplorer" version="2.1.0"/>
<dependency name="Core" version="2.1.0"/>
<dependency name="VCSBase" version="2.1.0"/>
<dependency name="TextEditor" version="2.0.81"/>
<dependency name="ProjectExplorer" version="2.0.81"/>
<dependency name="Core" version="2.0.81"/>
<dependency name="VCSBase" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="HelloWorld" version="2.1.0" compatVersion="2.1.0">
<plugin name="HelloWorld" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -13,6 +13,6 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Hello World sample plugin.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="2.1.0"/>
<dependency name="Core" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="Help" version="2.1.0" compatVersion="2.1.0">
<plugin name="Help" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,8 +14,8 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Help system.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="2.1.0"/>
<dependency name="Find" version="2.1.0"/>
<dependency name="Locator" version="2.1.0"/>
<dependency name="Core" version="2.0.81"/>
<dependency name="Find" version="2.0.81"/>
<dependency name="Locator" version="2.0.81"/>
</dependencyList>
</plugin>
......@@ -857,12 +857,13 @@ void HelpPlugin::highlightSearchTerms()
if (name.isEmpty())
continue;
if (m_oldAttrValue == name) {
if (m_oldAttrValue == name
|| name.startsWith(m_oldAttrValue + QLatin1Char('-'))) {
QWebElement parent = element.parent();
parent.setStyleProperty(property, m_styleProperty);
}
if (attrValue == name) {
if (attrValue == name || name.startsWith(attrValue + QLatin1Char('-'))) {
QWebElement parent = element.parent();
m_styleProperty = parent.styleProperty(property,
QWebElement::InlineStyle);
......@@ -871,7 +872,6 @@ void HelpPlugin::highlightSearchTerms()
}
m_oldAttrValue = attrValue;
#endif
viewer->findText(m_idFromContext, 0, false, true);
}
}
......
<plugin name="Locator" version="2.1.0" compatVersion="2.1.0">
<plugin name="Locator" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,6 +14,6 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Provides the Locator widget and the hooks for Locator filter implementations.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="2.1.0"/>
<dependency name="Core" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="Mercurial" version="2.1.0" compatVersion="2.1.0">
<plugin name="Mercurial" version="2.0.81" compatVersion="2.0.81">
<vendor>Brian McGillion</vendor>
<copyright>(C) 2008-2009 Brian McGillion</copyright>
<license>
......@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Mercurial integration.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="ProjectExplorer" version="2.1.0"/>
<dependency name="Core" version="2.1.0"/>
<dependency name="VCSBase" version="2.1.0"/>
<dependency name="TextEditor" version="2.0.81"/>
<dependency name="ProjectExplorer" version="2.0.81"/>
<dependency name="Core" version="2.0.81"/>
<dependency name="VCSBase" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="Perforce" version="2.1.0" compatVersion="2.1.0">
<plugin name="Perforce" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,9 +14,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Perforce integration.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="ProjectExplorer" version="2.1.0"/>
<dependency name="Core" version="2.1.0"/>
<dependency name="VCSBase" version="2.1.0"/>
<dependency name="TextEditor" version="2.0.81"/>
<dependency name="ProjectExplorer" version="2.0.81"/>
<dependency name="Core" version="2.0.81"/>
<dependency name="VCSBase" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="ProjectExplorer" version="2.1.0" compatVersion="2.1.0">
<plugin name="ProjectExplorer" version="2.0.81" compatVersion="2.0.81">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -14,10 +14,10 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>ProjectExplorer framework that can be extended with different kind of project types.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="2.1.0"/>
<dependency name="Find" version="2.1.0"/>
<dependency name="Locator" version="2.1.0"/>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="Core" version="2.0.81"/>
<dependency name="Find" version="2.0.81"/>
<dependency name="Locator" version="2.0.81"/>
<dependency name="TextEditor" version="2.0.81"/>
</dependencyList>
<argumentList>
<argument name="-customwizard-verbose">Verbose loading of custom wizards</argument>
......
......@@ -331,13 +331,18 @@ QList<CustomWizard*> CustomWizard::createWizards()
if (dir.exists(configFile)) {
CustomWizardParametersPtr parameters(new Internal::CustomWizardParameters);
Core::BaseFileWizardParameters baseFileParameters;
if (parameters->parse(dir.absoluteFilePath(configFile), &baseFileParameters, &errorMessage)) {
switch (parameters->parse(dir.absoluteFilePath(configFile), &baseFileParameters, &errorMessage)) {
case Internal::CustomWizardParameters::ParseOk:
parameters->directory = dir.absolutePath();
if (CustomWizardPrivate::verbose)
verboseLog += parameters->toString();
if (CustomWizard *w = createWizard(parameters, baseFileParameters))
rc.push_back(w);
} else {
case Internal::CustomWizardParameters::ParseDisabled:
if (CustomWizardPrivate::verbose)
qWarning("Ignoring disabled wizard %s...", qPrintable(dir.absolutePath()));
break;
case Internal::CustomWizardParameters::ParseFailed:
qWarning("Failed to initialize custom project wizard in %s: %s",
qPrintable(dir.absolutePath()), qPrintable(errorMessage));
}
......
......@@ -48,6 +48,7 @@ static const char customWizardElementC[] = "wizard";
static const char iconElementC[] = "icon";
static const char descriptionElementC[] = "description";
static const char displayNameElementC[] = "displayname";
static const char wizardEnabledAttributeC[] = "enabled";
static const char idAttributeC[] = "id";
static const char kindAttributeC[] = "kind";
static const char klassAttributeC[] = "class";
......@@ -329,9 +330,13 @@ static inline QString msgError(const QXmlStreamReader &reader,
arg(fileName).arg(reader.lineNumber()).arg(reader.columnNumber()).arg(what);
}
static inline bool booleanAttributeValue(const QXmlStreamReader &r, const char *name)
static inline bool booleanAttributeValue(const QXmlStreamReader &r, const char *nameC,
bool defaultValue)
{
return r.attributes().value(QLatin1String(name)) == QLatin1String("true");
const QStringRef attributeValue = r.attributes().value(QLatin1String(nameC));
if (attributeValue.isEmpty())
return defaultValue;
return attributeValue == QLatin1String("true");
}
static inline int integerAttributeValue(const QXmlStreamReader &r, const char *name, int defaultValue)
......@@ -368,7 +373,8 @@ static inline QString localeLanguage()
}
// Main parsing routine
bool CustomWizardParameters::parse(QIODevice &device,
CustomWizardParameters::ParseResult
CustomWizardParameters::parse(QIODevice &device,
const QString &configFileFullPath,
Core::BaseFileWizardParameters *bp,
QString *errorMessage)
......@@ -386,7 +392,7 @@ bool CustomWizardParameters::parse(QIODevice &device,
switch (token) {
case QXmlStreamReader::Invalid:
*errorMessage = msgError(reader, configFileFullPath, reader.errorString());
return false;
return ParseFailed;
case QXmlStreamReader::StartElement:
do {
// Read out subelements applicable to current state
......@@ -401,8 +407,10 @@ bool CustomWizardParameters::parse(QIODevice &device,
case ParseError:
*errorMessage = msgError(reader, configFileFullPath,
QString::fromLatin1("Unexpected start element %1").arg(reader.name().toString()));
return false;
return ParseFailed;
case ParseWithinWizard:
if (!booleanAttributeValue(reader, wizardEnabledAttributeC, true))
return ParseDisabled;
bp->setId(attributeValue(reader, idAttributeC));
bp->setCategory(attributeValue(reader, categoryAttributeC));
bp->setKind(kindAttribute(reader));
......@@ -411,14 +419,14 @@ bool CustomWizardParameters::parse(QIODevice &device,
break;
case ParseWithinField: // field attribute
field.name = attributeValue(reader, fieldNameAttributeC);
field.mandatory = booleanAttributeValue(reader, fieldMandatoryAttributeC);
field.mandatory = booleanAttributeValue(reader, fieldMandatoryAttributeC, false);
break;
case ParseWithinFile: { // file attribute
CustomWizardFile file;
file.source = attributeValue(reader, fileNameSourceAttributeC);
file.target = attributeValue(reader, fileNameTargetAttributeC);
file.openEditor = booleanAttributeValue(reader, fileNameOpenEditorAttributeC);
file.openProject = booleanAttributeValue(reader, fileNameOpenProjectAttributeC);
file.openEditor = booleanAttributeValue(reader, fileNameOpenEditorAttributeC, false);
file.openProject = booleanAttributeValue(reader, fileNameOpenProjectAttributeC, false);
if (file.target.isEmpty())
file.target = file.source;
if (file.source.isEmpty()) {
......@@ -438,7 +446,7 @@ bool CustomWizardParameters::parse(QIODevice &device,
if (state == ParseError) {
*errorMessage = msgError(reader, configFileFullPath,
QString::fromLatin1("Unexpected end element %1").arg(reader.name().toString()));
return false;
return ParseFailed;
}
if (state == ParseWithinFields) { // Leaving a field element
fields.push_back(field);
......@@ -449,17 +457,18 @@ bool CustomWizardParameters::parse(QIODevice &device,
break;
}
} while (token != QXmlStreamReader::EndDocument);
return true;
return ParseOk;
}
bool CustomWizardParameters::parse(const QString &configFileFullPath,
CustomWizardParameters::ParseResult
CustomWizardParameters::parse(const QString &configFileFullPath,
Core::BaseFileWizardParameters *bp,
QString *errorMessage)
{
QFile configFile(configFileFullPath);
if (!configFile.open(QIODevice::ReadOnly|QIODevice::Text)) {
*errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(configFileFullPath, configFile.errorString());
return false;
return ParseFailed;
}
return parse(configFile, configFileFullPath, bp, errorMessage);
}
......
......@@ -67,12 +67,14 @@ struct CustomWizardFile {
struct CustomWizardParameters
{
public:
enum ParseResult { ParseOk, ParseDisabled, ParseFailed };
CustomWizardParameters();
void clear();
bool parse(QIODevice &device, const QString &configFileFullPath,
Core::BaseFileWizardParameters *bp, QString *errorMessage);
bool parse(const QString &configFileFullPath,
Core::BaseFileWizardParameters *bp, QString *errorMessage);
ParseResult parse(QIODevice &device, const QString &configFileFullPath,
Core::BaseFileWizardParameters *bp, QString *errorMessage);
ParseResult parse(const QString &configFileFullPath,
Core::BaseFileWizardParameters *bp, QString *errorMessage);
QString toString() const;
QString directory;
......
......@@ -234,6 +234,8 @@ QString Project::projectDirectory() const
QString Project::projectDirectory(const QString &proFile)
{
if (proFile.isEmpty())
return QString();
QFileInfo info(proFile);
return info.absoluteDir().path();
}
......
......@@ -909,16 +909,8 @@ void ProjectExplorerPlugin::newProject()
if (debug)
qDebug() << "ProjectExplorerPlugin::newProject";
QString defaultLocation;
if (currentProject()) {
QDir dir(currentProject()->projectDirectory());
dir.cdUp();
defaultLocation = dir.absolutePath();
}
Core::ICore::instance()->showNewItemDialog(tr("New Project", "Title of dialog"),
Core::IWizard::wizardsOfKind(Core::IWizard::ProjectWizard),
defaultLocation);
Core::IWizard::wizardsOfKind(Core::IWizard::ProjectWizard));
updateActions();
}
......
<plugin name="QmlDesigner" version="2.1.0" compatVersion="2.1.0" experimental="true">
<plugin name="QmlDesigner" version="2.0.81" compatVersion="2.0.81" experimental="true">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -20,8 +20,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Visual Designer for QML files.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="2.1.0"/>
<dependency name="TextEditor" version="2.1.0"/>
<dependency name="QmlJSEditor" version="2.1.0"/>
<dependency name="Core" version="2.0.81"/>
<dependency name="TextEditor" version="2.0.81"/>
<dependency name="QmlJSEditor" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="QmlInspector" version="2.1.0" compatVersion="2.1.0" experimental="true">
<plugin name="QmlInspector" version="2.0.81" compatVersion="2.0.81" experimental="true">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2010 Nokia Corporation</copyright>
<license>
......@@ -20,11 +20,11 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Debugger for QML files</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="QmlProjectManager" version="2.1.0"/>
<dependency name="ProjectExplorer" version="2.1.0"/>
<dependency name="CppTools" version="2.1.0"/>
<dependency name="CppEditor" version="2.1.0"/>
<dependency name="Debugger" version="2.1.0"/>
<dependency name="QmlJSEditor" version="2.1.0"/>
<dependency name="QmlProjectManager" version="2.0.81"/>
<dependency name="ProjectExplorer" version="2.0.81"/>
<dependency name="CppTools" version="2.0.81"/>
<dependency name="CppEditor" version="2.0.81"/>
<dependency name="Debugger" version="2.0.81"/>
<dependency name="QmlJSEditor" version="2.0.81"/>
</dependencyList>
</plugin>
<plugin name="QmlJSEditor" version="2.1.0" compatVersion="2.1.0">
<plugin name="QmlJSEditor" version="2.0.81" compatVersion="2.0.81"></