Merge remote-tracking branch 'origin/2.7'

Conflicts:
	doc/src/debugger/qtquick-debugger-example.qdoc

Change-Id: If9a6ac2db76773c50aae26c5156e6aa2603329b3
This commit is contained in:
Eike Ziller
2013-03-18 10:19:14 +01:00
48 changed files with 227 additions and 83 deletions

View File

@@ -31,6 +31,7 @@
function Component() function Component()
{ {
component.loaded.connect(this, Component.prototype.loaded); component.loaded.connect(this, Component.prototype.loaded);
installer.installationFinished.connect(this, Component.prototype.installationFinishedPageIsShown);
installer.finishButtonClicked.connect(this, Component.prototype.installationFinished); installer.finishButtonClicked.connect(this, Component.prototype.installationFinished);
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false); installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
} }
@@ -173,6 +174,17 @@ Component.prototype.createOperations = function()
} }
} }
Component.prototype.installationFinishedPageIsShown = function()
{
try {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success) {
installer.addWizardPageItem( component, "LaunchQtCreatorCheckBoxForm", QInstaller.InstallationFinished );
}
} catch(e) {
print(e);
}
}
Component.prototype.installationFinished = function() Component.prototype.installationFinished = function()
{ {
try { try {

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LaunchQtCreatorCheckBoxForm</class>
<widget class="QWidget" name="LaunchQtCreatorCheckBoxForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>112</width>
<height>17</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="launchQtCreatorCheckBox">
<property name="text">
<string>Launch Qt Creator</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="tristate">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -14,5 +14,6 @@
<AutoDependOn>org.qtproject.qtcreator</AutoDependOn> <AutoDependOn>org.qtproject.qtcreator</AutoDependOn>
<UserInterfaces> <UserInterfaces>
<UserInterface>associatecommonfiletypesform.ui</UserInterface> <UserInterface>associatecommonfiletypesform.ui</UserInterface>
<UserInterface>launchqtcreatorcheckboxform.ui</UserInterface>
</UserInterfaces> </UserInterfaces>
</Package> </Package>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

@@ -83,8 +83,8 @@
\image qtquick-example-setting-breakpoint3.png \image qtquick-example-setting-breakpoint3.png
\li To execute JavaScript commands in the current context, select the \li To execute JavaScript commands in the current context, open the
\gui {Console} tab. \gui {QML/JS Console} output pane.
\li To change the score to 1000, enter \c{gameCanvas.score = 1000} \li To change the score to 1000, enter \c{gameCanvas.score = 1000}
in the console. in the console.
@@ -108,15 +108,15 @@
\inlineimage qml-inspector-select-button.png \inlineimage qml-inspector-select-button.png
(\gui Select) to activate selection mode and then click the (\gui Select) to activate selection mode and then click the
\gui {Quit} button to move into the \gui ButtonLabel component \gui {Quit} button to move into the \gui ButtonLabel component
in the \gui {Console} and the code editor. in the \gui {QML/JS Console} and the code editor.
\image qtquick-example-property-values.png
\li In the \gui {Locals and Expressions} view, double-click the value of \li In the \gui {Locals and Expressions} view, double-click the value of
the \c text property to change it temporarily from \gui {Quit} to the \c text property to change it temporarily from \gui {Quit} to
\gui {End Game}. \gui {End Game}.
When you select an item, the cursor moves to it in the code \image qtquick-example-property-values.png
When you select an element, the cursor moves to it in the code
editor, where you can change the value permanently. editor, where you can change the value permanently.
\endlist \endlist

View File

@@ -168,7 +168,7 @@
\inlineimage qml-observer-bar-reload.png "Apply Changes on Save button" \inlineimage qml-observer-bar-reload.png "Apply Changes on Save button"
(\gui {Apply Changes on Save}) button on the toolbar. (\gui {Apply Changes on Save}) button on the toolbar.
When you change property values in the \gui {Console} or in the When you change property values in the \gui {QML/JS Console} or in the
\gui {Locals and Expressions} view, they are immediately updated in the running \gui {Locals and Expressions} view, they are immediately updated in the running
application, but not in the source code. application, but not in the source code.

View File

@@ -21,11 +21,21 @@ OTHER_FILES += dist/copyright_template.txt \
qbs/pluginspec/pluginspec.qbs qbs/pluginspec/pluginspec.qbs
qmake_cache = $$targetPath($$IDE_BUILD_TREE/.qmake.cache) qmake_cache = $$targetPath($$IDE_BUILD_TREE/.qmake.cache)
unix: maybe_quote = \" equals(QMAKE_DIR_SEP, /): {
maybe_quote = "\""
maybe_backslash = "\\"
}
system("echo $${maybe_quote}$${LITERAL_HASH} config for qmake$${maybe_quote} > $$qmake_cache") system("echo $${maybe_quote}$${LITERAL_HASH} config for qmake$${maybe_quote} > $$qmake_cache")
# Make sure the qbs dll ends up alongside the Creator executable. # Make sure the qbs dll ends up alongside the Creator executable.
win32:exists(src/shared/qbs/qbs.pro) { exists(src/shared/qbs/qbs.pro) {
system("echo QBS_DLLDESTDIR = $${IDE_BUILD_TREE}/bin >> $$qmake_cache") system("echo QBS_DLLDESTDIR = $${IDE_BUILD_TREE}/bin >> $$qmake_cache")
system("echo QBS_DESTDIR = $${maybe_backslash}\"$${IDE_LIBRARY_PATH}$${maybe_backslash}\" >> $$qmake_cache")
system("echo QBSLIBDIR = $${maybe_backslash}\"$${IDE_LIBRARY_PATH}$${maybe_backslash}\" >> $$qmake_cache")
system("echo QBS_INSTALL_PREFIX = $${QTC_PREFIX} >> $$qmake_cache")
system("echo QBS_LIB_INSTALL_DIR = $${QTC_PREFIX}/$${IDE_LIBRARY_BASENAME}/qtcreator >> $$qmake_cache")
system("echo QBS_RESOURCES_BUILD_DIR = $${maybe_backslash}\"$${IDE_DATA_PATH}/qbs$${maybe_backslash}\" >> $$qmake_cache")
system("echo QBS_RESOURCES_INSTALL_DIR = $${QTC_PREFIX}/share/qtcreator/qbs >> $$qmake_cache")
system("echo CONFIG += qbs_no_dev_install >> $$qmake_cache")
} }
contains(QT_ARCH, i386): ARCHITECTURE = x86 contains(QT_ARCH, i386): ARCHITECTURE = x86

View File

@@ -12,7 +12,7 @@ cp -a "${sourceFolder}/" "${intermediateFolder}"
ln -s /Applications "${intermediateFolder}" ln -s /Applications "${intermediateFolder}"
cp "$(dirname "${BASH_SOURCE[0]}")/../LICENSE.LGPL" "${intermediateFolder}/LICENSE_LGPL.txt" cp "$(dirname "${BASH_SOURCE[0]}")/../LICENSE.LGPL" "${intermediateFolder}/LICENSE_LGPL.txt"
echo Creating image... echo Creating image...
hdiutil create -srcfolder "${intermediateFolder}" -volname "${title}" -format UDBZ "${finalDMGName}" -ov -scrub hdiutil create -srcfolder "${intermediateFolder}" -volname "${title}" -format UDBZ "${finalDMGName}" -ov -scrub -stretch 1g
# clean up # clean up
rm -rf "${intermediateFolder}" rm -rf "${intermediateFolder}"

View File

@@ -2664,14 +2664,13 @@ def qdump__Eigen__Matrix(d, value):
storage = value["m_storage"] storage = value["m_storage"]
options = numericTemplateArgument(value.type, 3) options = numericTemplateArgument(value.type, 3)
rowMajor = (int(options) & 0x1) rowMajor = (int(options) & 0x1)
argRow = numericTemplateArgument(value.type, 1)
argCol = numericTemplateArgument(value.type, 2)
nrows = value["m_storage"]["m_rows"] if argRow == -1 else int(argRow)
ncols = value["m_storage"]["m_cols"] if argCol == -1 else int(argCol)
p = storage["m_data"] p = storage["m_data"]
if p.type.code == StructCode: # Static if p.type.code == StructCode: # Static
nrows = numericTemplateArgument(value.type, 1)
ncols = numericTemplateArgument(value.type, 2)
p = p["array"].cast(innerType.pointer()) p = p["array"].cast(innerType.pointer())
else: # Dynamic
ncols = storage["m_cols"]
nrows = storage["m_rows"]
d.putValue("(%s x %s), %s" % (nrows, ncols, ["ColumnMajor", "RowMajor"][rowMajor])) d.putValue("(%s x %s), %s" % (nrows, ncols, ["ColumnMajor", "RowMajor"][rowMajor]))
d.putField("keeporder", "1") d.putField("keeporder", "1")
d.putNumChild(nrows * ncols) d.putNumChild(nrows * ncols)

View File

@@ -82,8 +82,9 @@ void NodeInstanceSignalSpy::registerObject(QObject *spiedObject, const PropertyN
// search recursive in objects // search recursive in objects
if (metaProperty.isReadable() if (metaProperty.isReadable()
&& metaProperty.isWritable() && metaProperty.isWritable()
&& QQmlMetaType::isQObject(metaProperty.userType())) { && QQmlMetaType::isQObject(metaProperty.userType())
&& QLatin1String(metaProperty.name()) != QLatin1String("parent")) {
QObject *propertyObject = QQmlMetaType::toQObject(metaProperty.read(spiedObject)); QObject *propertyObject = QQmlMetaType::toQObject(metaProperty.read(spiedObject));
if (propertyObject) if (propertyObject)
registerObject(propertyObject, prefix + metaProperty.name() + '/'); registerObject(propertyObject, prefix + metaProperty.name() + '/');

View File

@@ -4,5 +4,5 @@
id="QB.QML Application for Qt Quick 1.1"> id="QB.QML Application for Qt Quick 1.1">
<displayname>Qt Quick 1 UI</displayname> <displayname>Qt Quick 1 UI</displayname>
<displayname xml:lang="de">Qt Quick 1 UI</displayname> <displayname xml:lang="de">Qt Quick 1 UI</displayname>
<description>Creates a Qt Quick UI 1 project with a single QML file that contains the main view.&lt;br&gt; You can review Qt Quick UI 1 projects in the QML Viewer and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects. &lt;br&gt;&lt;br&gt;Requires &lt;b&gt;Qt 4.8&lt;/b&gt; or newer.</description> <description>Creates a Qt Quick 1 UI project with a single QML file that contains the main view.&lt;br/&gt;You can review Qt Quick 1 UI projects in the QML Viewer and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects.&lt;br/&gt;&lt;br/&gt;Requires &lt;b&gt;Qt 4.8&lt;/b&gt; or newer.</description>
</template> </template>

View File

@@ -4,5 +4,5 @@
id="QB.QML Application for Qt Quick 2.0"> id="QB.QML Application for Qt Quick 2.0">
<displayname>Qt Quick 2 UI</displayname> <displayname>Qt Quick 2 UI</displayname>
<displayname xml:lang="de">Qt Quick 2 UI</displayname> <displayname xml:lang="de">Qt Quick 2 UI</displayname>
<description>Creates a Qt Quick UI 2 project with a single QML file that contains the main view.&lt;br&gt; You can review Qt Quick UI 2 projects in the QML Scene and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects.&lt;br&gt;&lt;br&gt;Requires &lt;b&gt;Qt 5.0&lt;/b&gt; or newer.</description> <description>Creates a Qt Quick 2 UI project with a single QML file that contains the main view.&lt;br/&gt;You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects.&lt;br/&gt;&lt;br/&gt;Requires &lt;b&gt;Qt 5.0&lt;/b&gt; or newer.</description>
</template> </template>

View File

@@ -8,7 +8,7 @@
namespace %PluginName% { namespace %PluginName% {
namespace Internal { namespace Internal {
class %PluginName:u%SHARED_EXPORT %PluginName%Plugin : public ExtensionSystem::IPlugin class %PluginName%Plugin : public ExtensionSystem::IPlugin
{ {
Q_OBJECT Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "%PluginName%.json") Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "%PluginName%.json")

View File

@@ -250,7 +250,7 @@ PathChooser::PathChooser(QWidget *parent) :
connect(d->m_lineEdit, SIGNAL(validChanged(bool)), this, SIGNAL(validChanged(bool))); connect(d->m_lineEdit, SIGNAL(validChanged(bool)), this, SIGNAL(validChanged(bool)));
connect(d->m_lineEdit, SIGNAL(editingFinished()), this, SIGNAL(editingFinished())); connect(d->m_lineEdit, SIGNAL(editingFinished()), this, SIGNAL(editingFinished()));
d->m_lineEdit->setMinimumWidth(200); d->m_lineEdit->setMinimumWidth(120);
d->m_hLayout->addWidget(d->m_lineEdit); d->m_hLayout->addWidget(d->m_lineEdit);
d->m_hLayout->setSizeConstraint(QLayout::SetMinimumSize); d->m_hLayout->setSizeConstraint(QLayout::SetMinimumSize);

View File

@@ -8,22 +8,25 @@ QtcLibrary {
Depends { name: "Qt.network" } Depends { name: "Qt.network" }
cpp.includePaths: base.concat(".") cpp.includePaths: base.concat(".")
cpp.defines: base.concat("ZEROCONF_LIBRARY") cpp.defines: {
var list = base;
list.push("ZEROCONF_LIBRARY");
if (qbs.targetOS === "linux") {
list.push(
"_GNU_SOURCE",
"HAVE_IPV6",
"USES_NETLINK",
"HAVE_LINUX",
"TARGET_OS_LINUX"
);
}
return list;
}
Properties { Properties {
condition: qbs.targetOS == "windows" condition: qbs.targetOS == "windows"
cpp.dynamicLibraries: "ws2_32" cpp.dynamicLibraries: "ws2_32"
} }
Properties {
condition: qbs.targetOS == "linux"
cpp.defines: base.concat([
"_GNU_SOURCE",
"HAVE_IPV6",
"USES_NETLINK",
"HAVE_LINUX",
"TARGET_OS_LINUX"
])
}
files: [ files: [
"avahiLib.cpp", "avahiLib.cpp",

View File

@@ -223,6 +223,8 @@ void CMakeValidator::parseFunctionDetailsOutput(const QByteArray &output)
QList<QByteArray> cmakeCommandsHelp = output.split('\n'); QList<QByteArray> cmakeCommandsHelp = output.split('\n');
for (int i = 0; i < cmakeCommandsHelp.count(); ++i) { for (int i = 0; i < cmakeCommandsHelp.count(); ++i) {
QByteArray lineTrimmed = cmakeCommandsHelp.at(i).trimmed(); QByteArray lineTrimmed = cmakeCommandsHelp.at(i).trimmed();
if (cmakeFunctionsList.isEmpty())
break;
if (cmakeFunctionsList.first().toLatin1() == lineTrimmed) { if (cmakeFunctionsList.first().toLatin1() == lineTrimmed) {
QStringList commandSyntaxes; QStringList commandSyntaxes;
QString currentCommandSyntax; QString currentCommandSyntax;
@@ -231,7 +233,7 @@ void CMakeValidator::parseFunctionDetailsOutput(const QByteArray &output)
for (; i < cmakeCommandsHelp.count(); ++i) { for (; i < cmakeCommandsHelp.count(); ++i) {
lineTrimmed = cmakeCommandsHelp.at(i).trimmed(); lineTrimmed = cmakeCommandsHelp.at(i).trimmed();
if (cmakeFunctionsList.first().toLatin1() == lineTrimmed) { if (!cmakeFunctionsList.isEmpty() && cmakeFunctionsList.first().toLatin1() == lineTrimmed) {
//start of next function in output //start of next function in output
if (!currentCommandSyntax.isEmpty()) if (!currentCommandSyntax.isEmpty())
commandSyntaxes << currentCommandSyntax.append(QLatin1String("</table>")); commandSyntaxes << currentCommandSyntax.append(QLatin1String("</table>"));

View File

@@ -145,8 +145,12 @@ public:
QString tmpDir = dir; QString tmpDir = dir;
const QChar slash = QLatin1Char('/'); const QChar slash = QLatin1Char('/');
while (tmpDir.count() >= topLevel.count() && tmpDir.count() > 0) { while (tmpDir.count() >= topLevel.count() && !tmpDir.isEmpty()) {
m_cachedMatches.insert(tmpDir, newInfo); m_cachedMatches.insert(tmpDir, newInfo);
// if no vc was found, this might mean we're inside a repo internal directory (.git)
// Cache only input directory, not parents
if (!vc)
break;
const int slashPos = tmpDir.lastIndexOf(slash); const int slashPos = tmpDir.lastIndexOf(slash);
if (slashPos >= 0) if (slashPos >= 0)
tmpDir.truncate(slashPos); tmpDir.truncate(slashPos);

View File

@@ -240,6 +240,11 @@ CppToolsSettings::~CppToolsSettings()
{ {
ExtensionSystem::PluginManager::removeObject(d->m_completionSettingsPage); ExtensionSystem::PluginManager::removeObject(d->m_completionSettingsPage);
TextEditor::TextEditorSettings *textEditorSettings = TextEditor::TextEditorSettings::instance();
textEditorSettings->unregisterCodeStyle(Constants::CPP_SETTINGS_ID);
textEditorSettings->unregisterCodeStylePool(Constants::CPP_SETTINGS_ID);
textEditorSettings->unregisterCodeStyleFactory(Constants::CPP_SETTINGS_ID);
delete d; delete d;
m_instance = 0; m_instance = 0;

View File

@@ -2402,6 +2402,9 @@ void CdbEngine::handleExtensionMessage(char t, int token, const QByteArray &what
GdbMi gdbmi; GdbMi gdbmi;
gdbmi.fromString(message); gdbmi.fromString(message);
exception.fromGdbMI(gdbmi); exception.fromGdbMI(gdbmi);
// Don't show the Win32 x86 emulation subsystem breakpoint hit exception.
if (exception.exceptionCode == winExceptionWX86Breakpoint)
return;
const QString message = exception.toString(true); const QString message = exception.toString(true);
showStatusMessage(message); showStatusMessage(message);
// Report C++ exception in application output as well. // Report C++ exception in application output as well.

View File

@@ -203,7 +203,8 @@ DebuggerKitInformation::DebuggerItem DebuggerKitInformation::autoDetectItem(cons
void DebuggerKitInformation::setup(Kit *k) void DebuggerKitInformation::setup(Kit *k)
{ {
QTC_ASSERT(ToolChainManager::instance()->isLoaded(), return); QTC_ASSERT(ToolChainManager::instance()->isLoaded(), return);
setDebuggerItem(k, autoDetectItem(k)); if (!isValidDebugger(k))
setDebuggerItem(k, autoDetectItem(k));
} }
// Check the configuration errors and return a flag mask. Provide a quick check and // Check the configuration errors and return a flag mask. Provide a quick check and

View File

@@ -1574,8 +1574,11 @@ void DebuggerPluginPrivate::onCurrentProjectChanged(Project *project)
m_interruptAction->setEnabled(false); m_interruptAction->setEnabled(false);
m_continueAction->setEnabled(false); m_continueAction->setEnabled(false);
m_exitAction->setEnabled(false); m_exitAction->setEnabled(false);
m_startAction->setEnabled(true); ProjectExplorerPlugin *pe = ProjectExplorerPlugin::instance();
m_debugWithoutDeployAction->setEnabled(true); const bool canRun = pe->canRun(project, DebugRunMode);
m_startAction->setEnabled(canRun);
m_startAction->setToolTip(canRun ? QString() : pe->cannotRunReason(project, DebugRunMode));
m_debugWithoutDeployAction->setEnabled(canRun);
setProxyAction(m_visibleStartAction, Core::Id(Constants::DEBUG)); setProxyAction(m_visibleStartAction, Core::Id(Constants::DEBUG));
} }

View File

@@ -1640,6 +1640,15 @@ void QmlV8DebuggerClient::setCurrentFrameDetails(const QVariant &bodyVal, const
d->clearCache(); d->clearCache();
const int frameIndex = stackHandler->currentIndex(); const int frameIndex = stackHandler->currentIndex();
QSet<QByteArray> expandedInames = watchHandler->expandedINames();
QHash<quint64, QByteArray> handlesToLookup;
// Store handles of all expanded watch data
foreach (const QByteArray &iname, expandedInames) {
const WatchData *wd = watchHandler->findData(iname);
if (!wd || !wd->isLocal())
continue;
handlesToLookup.insert(wd->id, iname);
}
watchHandler->removeAllData(); watchHandler->removeAllData();
if (frameIndex < 0) if (frameIndex < 0)
return; return;
@@ -1678,6 +1687,11 @@ void QmlV8DebuggerClient::setCurrentFrameDetails(const QVariant &bodyVal, const
d->scope(scopeIndex); d->scope(scopeIndex);
} }
d->engine->gotoLocation(stackHandler->currentFrame()); d->engine->gotoLocation(stackHandler->currentFrame());
// Expand watch data that were previously expanded
QHash<quint64, QByteArray>::const_iterator itEnd = handlesToLookup.end();
for (QHash<quint64, QByteArray>::const_iterator it = handlesToLookup.begin(); it != itEnd; ++it)
expandObject(it.value(), it.key());
emit stackFrameCompleted(); emit stackFrameCompleted();
} }

View File

@@ -27,6 +27,14 @@
** **
****************************************************************************/ ****************************************************************************/
/*
The main algorithm "diffMyers()" is based on "An O(ND) Difference Algorithm
and Its Variations" by Eugene W. Myers: http://www.xmailserver.org/diff2.pdf
Preprocessing and postprocessing functions inspired by "Diff Strategies"
publication by Neil Fraser: http://neil.fraser.name/writing/diff/
*/
#include "differ.h" #include "differ.h"
#include <QList> #include <QList>

View File

@@ -21,11 +21,15 @@ QtcPlugin {
Depends { name: "app_version_header" } Depends { name: "app_version_header" }
Depends { name: "cpp" } Depends { name: "cpp" }
Properties {
condition: qtcore.versionMajor >= 5 cpp.defines: {
cpp.defines: base.concat(["QT_NO_WEBKIT"]) var list = base;
if (qtcore.versionMajor >= 5)
list.push("QT_NO_WEBKIT");
list.push("QT_CLUCENE_SUPPORT");
return list;
} }
cpp.defines: base.concat("QT_CLUCENE_SUPPORT")
cpp.includePaths: base.concat("../../shared/help") cpp.includePaths: base.concat("../../shared/help")
files: [ files: [

View File

@@ -191,7 +191,10 @@ void KitManager::restoreKits()
} }
// read all kits from user file // read all kits from user file
KitList userKits = restoreKits(settingsFileName()); KitList userKits;
Utils::FileName userSettingsFile(settingsFileName());
if (userSettingsFile.toFileInfo().exists())
userKits = restoreKits(userSettingsFile);
foreach (Kit *k, userKits.kits) { foreach (Kit *k, userKits.kits) {
if (k->isSdkProvided()) if (k->isSdkProvided())
kitsToCheck.append(k); kitsToCheck.append(k);
@@ -255,8 +258,6 @@ void KitManager::restoreKits()
KitManager::~KitManager() KitManager::~KitManager()
{ {
saveKits(); // Make sure we save the current state on exit!
foreach (Kit *k, d->m_kitList) foreach (Kit *k, d->m_kitList)
delete k; delete k;
d->m_kitList.clear(); d->m_kitList.clear();

View File

@@ -384,7 +384,7 @@ bool MsvcToolChain::fromMap(const QVariantMap &data)
{ {
if (!ToolChain::fromMap(data)) if (!ToolChain::fromMap(data))
return false; return false;
m_vcvarsBat = data.value(QLatin1String(varsBatKeyC)).toString(); m_vcvarsBat = QDir::fromNativeSeparators(data.value(QLatin1String(varsBatKeyC)).toString());
m_varsBatArg = data.value(QLatin1String(varsBatArgKeyC)).toString(); m_varsBatArg = data.value(QLatin1String(varsBatArgKeyC)).toString();
const QString abiString = data.value(QLatin1String(supportedAbiKeyC)).toString(); const QString abiString = data.value(QLatin1String(supportedAbiKeyC)).toString();
m_abi = Abi(abiString); m_abi = Abi(abiString);
@@ -422,7 +422,7 @@ void MsvcToolChainConfigWidget::setFromToolChain()
{ {
MsvcToolChain *tc = static_cast<MsvcToolChain *>(toolChain()); MsvcToolChain *tc = static_cast<MsvcToolChain *>(toolChain());
QTC_ASSERT(tc, return); QTC_ASSERT(tc, return);
QString varsBatDisplay = tc->varsBat(); QString varsBatDisplay = QDir::toNativeSeparators(tc->varsBat());
if (!tc->varsBatArg().isEmpty()) { if (!tc->varsBatArg().isEmpty()) {
varsBatDisplay += QLatin1Char(' '); varsBatDisplay += QLatin1Char(' ');
varsBatDisplay += tc->varsBatArg(); varsBatDisplay += tc->varsBatArg();

View File

@@ -574,7 +574,7 @@ QString QbsProject::qbsBuildDir() const
QString buildDir = Utils::Environment::systemEnvironment() QString buildDir = Utils::Environment::systemEnvironment()
.value(QLatin1String("QBS_BUILD_DIR")); .value(QLatin1String("QBS_BUILD_DIR"));
if (buildDir.isEmpty()) if (buildDir.isEmpty())
buildDir = QLatin1String(QBS_BUILD_DIR); buildDir = Core::ICore::resourcePath() + QLatin1String("/qbs");
return buildDir; return buildDir;
} }

View File

@@ -9,10 +9,9 @@ include(qbsprojectmanager_dependencies.pri)
QBS_SOURCE_DIR = $$PWD/../../shared/qbs QBS_SOURCE_DIR = $$PWD/../../shared/qbs
QBS_BUILD_DIR = $$IDE_BUILD_TREE/src/shared/qbs QBS_BUILD_DIR = $$IDE_BUILD_TREE/src/shared/qbs
QBSLIBDIR = $$QBS_BUILD_DIR/lib
include($$QBS_SOURCE_DIR/src/lib/use.pri) include($$QBS_SOURCE_DIR/src/lib/use.pri)
linux-*:QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$$QBSLIBDIR\' # Mac: fix rpath for qbscore soname
macx:QMAKE_LFLAGS += -Wl,-rpath,$$QBSLIBDIR macx:QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../
QBS_BUILD_DIR_FWD_SLASHES = $$replace(QBS_BUILD_DIR, \\\\, /) QBS_BUILD_DIR_FWD_SLASHES = $$replace(QBS_BUILD_DIR, \\\\, /)
DEFINES += QBS_BUILD_DIR=\\\"$$QBS_BUILD_DIR_FWD_SLASHES\\\" DEFINES += QBS_BUILD_DIR=\\\"$$QBS_BUILD_DIR_FWD_SLASHES\\\"

View File

@@ -159,6 +159,11 @@ QmlJSToolsSettings::QmlJSToolsSettings(QObject *parent)
QmlJSToolsSettings::~QmlJSToolsSettings() QmlJSToolsSettings::~QmlJSToolsSettings()
{ {
TextEditor::TextEditorSettings *textEditorSettings = TextEditor::TextEditorSettings::instance();
textEditorSettings->unregisterCodeStyle(QmlJSTools::Constants::QML_JS_SETTINGS_ID);
textEditorSettings->unregisterCodeStylePool(QmlJSTools::Constants::QML_JS_SETTINGS_ID);
textEditorSettings->unregisterCodeStyleFactory(QmlJSTools::Constants::QML_JS_SETTINGS_ID);
delete m_globalCodeStyle; delete m_globalCodeStyle;
m_globalCodeStyle = 0; m_globalCodeStyle = 0;
} }

View File

@@ -98,9 +98,7 @@ bool QNXPlugin::initialize(const QStringList &arguments, QString *errorString)
barDescriptorMimeType.addMagicMatcher(QSharedPointer<Core::IMagicMatcher>(new BarDescriptorMagicMatcher)); barDescriptorMimeType.addMagicMatcher(QSharedPointer<Core::IMagicMatcher>(new BarDescriptorMagicMatcher));
barDescriptorMimeType.setSubClassesOf(QStringList() << QLatin1String("application/xml")); barDescriptorMimeType.setSubClassesOf(QStringList() << QLatin1String("application/xml"));
Core::ICore *core = Core::ICore::instance(); if (!Core::ICore::mimeDatabase()->addMimeType(barDescriptorMimeType)) {
Core::MimeDatabase *mdb = core->mimeDatabase();
if (!mdb->addMimeType(barDescriptorMimeType)) {
*errorString = tr("Could not add mime-type for bar-descriptor.xml editor"); *errorString = tr("Could not add mime-type for bar-descriptor.xml editor");
return false; return false;
} }

View File

@@ -196,7 +196,10 @@ bool MakeStep::init()
QString makefile = subNode->makefile(); QString makefile = subNode->makefile();
if (makefile.isEmpty()) if (makefile.isEmpty())
makefile = QLatin1String("Makefile"); makefile = QLatin1String("Makefile");
if (subNode->isDebugAndRelease()) { // Use Makefile.Debug and Makefile.Release
// for file builds, since the rules for that are
// only in those files.
if (subNode->isDebugAndRelease() && bc->fileNodeBuild()) {
if (bc->buildType() == Qt4BuildConfiguration::Debug) if (bc->buildType() == Qt4BuildConfiguration::Debug)
makefile += QLatin1String(".Debug"); makefile += QLatin1String(".Debug");
else else

View File

@@ -66,6 +66,9 @@ static const char QTVERSIONAUTODETECTED[] = "isAutodetected";
static const char QTVERSIONAUTODETECTIONSOURCE []= "autodetectionSource"; static const char QTVERSIONAUTODETECTIONSOURCE []= "autodetectionSource";
static const char QTVERSIONQMAKEPATH[] = "QMakePath"; static const char QTVERSIONQMAKEPATH[] = "QMakePath";
static const char MKSPEC_VALUE_LIBINFIX[] = "QT_LIBINFIX";
static const char MKSPEC_VALUE_NAMESPACE[] = "QT_NAMESPACE";
/////////////// ///////////////
// QtVersionNumber // QtVersionNumber
/////////////// ///////////////
@@ -369,12 +372,14 @@ Utils::FileName QtSupport::BaseQtVersion::mkspecsPath() const
QString QtSupport::BaseQtVersion::qtNamespace() const QString QtSupport::BaseQtVersion::qtNamespace() const
{ {
return qmakeProperty("QT_NAMESPACE"); ensureMkSpecParsed();
return m_mkspecValues.value(QLatin1String(MKSPEC_VALUE_NAMESPACE));
} }
QString QtSupport::BaseQtVersion::qtLibInfix() const QString QtSupport::BaseQtVersion::qtLibInfix() const
{ {
return qmakeProperty("QT_LIBINFIX"); ensureMkSpecParsed();
return m_mkspecValues.value(QLatin1String(MKSPEC_VALUE_LIBINFIX));
} }
void BaseQtVersion::setId(int id) void BaseQtVersion::setId(int id)
@@ -833,9 +838,13 @@ void BaseQtVersion::parseMkSpec(ProFileEvaluator *evaluator) const
const QString designerBins = QLatin1String("QT.designer.bins"); const QString designerBins = QLatin1String("QT.designer.bins");
const QString qmlBins = QLatin1String("QT.qml.bins"); const QString qmlBins = QLatin1String("QT.qml.bins");
const QString declarativeBins = QLatin1String("QT.declarative.bins"); const QString declarativeBins = QLatin1String("QT.declarative.bins");
const QString libinfix = QLatin1String(MKSPEC_VALUE_LIBINFIX);
const QString ns = QLatin1String(MKSPEC_VALUE_NAMESPACE);
m_mkspecValues.insert(designerBins, evaluator->value(designerBins)); m_mkspecValues.insert(designerBins, evaluator->value(designerBins));
m_mkspecValues.insert(qmlBins, evaluator->value(qmlBins)); m_mkspecValues.insert(qmlBins, evaluator->value(qmlBins));
m_mkspecValues.insert(declarativeBins, evaluator->value(declarativeBins)); m_mkspecValues.insert(declarativeBins, evaluator->value(declarativeBins));
m_mkspecValues.insert(libinfix, evaluator->value(libinfix));
m_mkspecValues.insert(ns, evaluator->value(ns));
} }
FileName BaseQtVersion::mkspec() const FileName BaseQtVersion::mkspec() const
@@ -951,10 +960,14 @@ void BaseQtVersion::updateVersionInfo() const
if (!fi.exists()) if (!fi.exists())
m_installed = false; m_installed = false;
} }
if (!qtHeaderData.isNull()) { // Framework builds for Qt 4.8 don't use QT_INSTALL_HEADERS
const QFileInfo fi(qtHeaderData); // so we don't check on mac
if (!fi.exists()) if (!HostOsInfo::isMacHost()) {
m_installed = false; if (!qtHeaderData.isNull()) {
const QFileInfo fi(qtHeaderData);
if (!fi.exists())
m_installed = false;
}
} }
const QString qtInstallDocs = qmakeProperty("QT_INSTALL_DOCS"); const QString qtInstallDocs = qmakeProperty("QT_INSTALL_DOCS");
if (!qtInstallDocs.isNull()) { if (!qtInstallDocs.isNull()) {

View File

@@ -411,6 +411,11 @@ void TextEditorSettings::registerCodeStyleFactory(ICodeStylePreferencesFactory *
m_d->m_languageToFactory.insert(factory->languageId(), factory); m_d->m_languageToFactory.insert(factory->languageId(), factory);
} }
void TextEditorSettings::unregisterCodeStyleFactory(Core::Id languageId)
{
m_d->m_languageToFactory.remove(languageId);
}
QMap<Core::Id, ICodeStylePreferencesFactory *> TextEditorSettings::codeStyleFactories() const QMap<Core::Id, ICodeStylePreferencesFactory *> TextEditorSettings::codeStyleFactories() const
{ {
return m_d->m_languageToFactory; return m_d->m_languageToFactory;
@@ -441,6 +446,11 @@ void TextEditorSettings::registerCodeStyle(Core::Id languageId, ICodeStylePrefer
m_d->m_languageToCodeStyle.insert(languageId, prefs); m_d->m_languageToCodeStyle.insert(languageId, prefs);
} }
void TextEditorSettings::unregisterCodeStyle(Core::Id languageId)
{
m_d->m_languageToCodeStyle.remove(languageId);
}
CodeStylePool *TextEditorSettings::codeStylePool() const CodeStylePool *TextEditorSettings::codeStylePool() const
{ {
return m_d->m_behaviorSettingsPage->codeStylePool(); return m_d->m_behaviorSettingsPage->codeStylePool();
@@ -456,6 +466,11 @@ void TextEditorSettings::registerCodeStylePool(Core::Id languageId, CodeStylePoo
m_d->m_languageToCodeStylePool.insert(languageId, pool); m_d->m_languageToCodeStylePool.insert(languageId, pool);
} }
void TextEditorSettings::unregisterCodeStylePool(Core::Id languageId)
{
m_d->m_languageToCodeStylePool.remove(languageId);
}
void TextEditorSettings::registerMimeTypeForLanguageId(const QString &mimeType, Core::Id languageId) void TextEditorSettings::registerMimeTypeForLanguageId(const QString &mimeType, Core::Id languageId)
{ {
m_d->m_mimeTypeToLanguage.insert(mimeType, languageId); m_d->m_mimeTypeToLanguage.insert(mimeType, languageId);

View File

@@ -92,15 +92,18 @@ public:
ICodeStylePreferencesFactory *codeStyleFactory(Core::Id languageId) const; ICodeStylePreferencesFactory *codeStyleFactory(Core::Id languageId) const;
QMap<Core::Id, ICodeStylePreferencesFactory *> codeStyleFactories() const; QMap<Core::Id, ICodeStylePreferencesFactory *> codeStyleFactories() const;
void registerCodeStyleFactory(ICodeStylePreferencesFactory *codeStyleFactory); void registerCodeStyleFactory(ICodeStylePreferencesFactory *codeStyleFactory);
void unregisterCodeStyleFactory(Core::Id languageId);
CodeStylePool *codeStylePool() const; CodeStylePool *codeStylePool() const;
CodeStylePool *codeStylePool(Core::Id languageId) const; CodeStylePool *codeStylePool(Core::Id languageId) const;
void registerCodeStylePool(Core::Id languageId, CodeStylePool *pool); void registerCodeStylePool(Core::Id languageId, CodeStylePool *pool);
void unregisterCodeStylePool(Core::Id languageId);
ICodeStylePreferences *codeStyle() const; ICodeStylePreferences *codeStyle() const;
ICodeStylePreferences *codeStyle(Core::Id languageId) const; ICodeStylePreferences *codeStyle(Core::Id languageId) const;
QMap<Core::Id, ICodeStylePreferences *> codeStyles() const; QMap<Core::Id, ICodeStylePreferences *> codeStyles() const;
void registerCodeStyle(Core::Id languageId, ICodeStylePreferences *prefs); void registerCodeStyle(Core::Id languageId, ICodeStylePreferences *prefs);
void unregisterCodeStyle(Core::Id languageId);
void registerMimeTypeForLanguageId(const QString &mimeType, Core::Id languageId); void registerMimeTypeForLanguageId(const QString &mimeType, Core::Id languageId);
Core::Id languageId(const QString &mimeType) const; Core::Id languageId(const QString &mimeType) const;

View File

@@ -19,9 +19,10 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
!macx { !macx {
win32 { win32 {
target.path = $$QTC_PREFIX/bin dlltarget.path = $$QTC_PREFIX/bin
INSTALLS += dlltarget
} else { } else {
target.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator target.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator
INSTALLS += target
} }
INSTALLS += target
} }

View File

@@ -95,6 +95,7 @@ bool QtLockedFile::unlock()
} }
m_lock_mode = NoLock; m_lock_mode = NoLock;
remove();
return true; return true;
} }

View File

@@ -167,6 +167,7 @@ bool QtLockedFile::unlock()
} }
m_lock_mode = QtLockedFile::NoLock; m_lock_mode = QtLockedFile::NoLock;
remove();
return true; return true;
} }

View File

@@ -1,4 +1,4 @@
QT += declarative quick QT += qml quick
macx:CONFIG -= app_bundle macx:CONFIG -= app_bundle

View File

@@ -1,7 +1,7 @@
#include <QGuiApplication> #include <QGuiApplication>
#include <QQuickView> #include <QQuickView>
#include <QDeclarativeContext> #include <QQmlContext>
#include <QDeclarativeEngine> #include <QQmlEngine>
#include <QDebug> #include <QDebug>
class Backend : public QObject { class Backend : public QObject {

View File

@@ -1,6 +1,8 @@
#include "myplugin.h" #include "myplugin.h"
#include "mytype.h" #include "mytype.h"
#include <qqml.h>
void MyPlugin::registerTypes(const char *uri) void MyPlugin::registerTypes(const char *uri)
{ {
// @uri mymodule // @uri mymodule
@@ -8,4 +10,3 @@ void MyPlugin::registerTypes(const char *uri)
qmlRegisterType<MyType>(uri, 1, 0, "MyType"); qmlRegisterType<MyType>(uri, 1, 0, "MyType");
} }
Q_EXPORT_PLUGIN(MyPlugin)

View File

@@ -1,13 +1,12 @@
#ifndef MYPLUGIN_H #ifndef MYPLUGIN_H
#define MYPLUGIN_H #define MYPLUGIN_H
#include <qdeclarative.h> #include <QQmlExtensionPlugin>
#include <QDeclarativeExtensionPlugin>
class MyPlugin : public QDeclarativeExtensionPlugin class MyPlugin : public QQmlExtensionPlugin
{ {
Q_OBJECT Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public: public:
void registerTypes(const char *uri); void registerTypes(const char *uri);
}; };

View File

@@ -1,6 +1,6 @@
TEMPLATE = lib TEMPLATE = lib
TARGET = myplugin TARGET = myplugin
QT += declarative QT += qml
CONFIG += qt plugin CONFIG += qt plugin
TARGET = $$qtLibraryTarget($$TARGET) TARGET = $$qtLibraryTarget($$TARGET)

View File

@@ -1,8 +1,8 @@
#include "mytype.h"
#include <QTimer> #include <QTimer>
#include <QTime> #include <QTime>
#include <qdeclarative.h> #include <qqml.h>
#include "mytype.h"
MyType::MyType(QObject *parent) MyType::MyType(QObject *parent)
: QObject(parent) : QObject(parent)

View File

@@ -1 +1,2 @@
module myplugin
plugin myplugin plugin myplugin

View File

@@ -111,7 +111,8 @@ def modifyRunSettingsForHookIntoQtQuickUI(kitCount, workingDir, projectName, por
if platform.system() == "Darwin": if platform.system() == "Darwin":
__addVariableToRunEnvironment__("DYLD_FRAMEWORK_PATH", qtLibPath) __addVariableToRunEnvironment__("DYLD_FRAMEWORK_PATH", qtLibPath)
if not platform.system() in ('Microsoft', 'Windows'): if not platform.system() in ('Microsoft', 'Windows'):
__addVariableToRunEnvironment__("DISPLAY", ":0.0") if not os.getenv("DISPLAY"):
__addVariableToRunEnvironment__("DISPLAY", ":0.0")
result = qmlViewer result = qmlViewer
switchViewTo(ViewConstants.EDIT) switchViewTo(ViewConstants.EDIT)
return result return result

View File

@@ -291,7 +291,7 @@ def __checkParentAccess__(filePath):
# this function checks for all configured Qt versions inside # this function checks for all configured Qt versions inside
# options dialog and returns a dict holding the kits as keys # options dialog and returns a dict holding the kits as keys
# and a list of information of its configured Qt # and a list of information of its configured Qt
def getConfiguredKits(isMaddedDisabled=True): def getConfiguredKits(isMaddeDisabled=True):
def __retrieveQtVersionName__(target, version): def __retrieveQtVersionName__(target, version):
treeWidget = waitForObject(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget") treeWidget = waitForObject(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget")
return treeWidget.currentItem().text(0) return treeWidget.currentItem().text(0)
@@ -310,8 +310,8 @@ def getConfiguredKits(isMaddedDisabled=True):
# update collected Qt versions with their configured device and version # update collected Qt versions with their configured device and version
iterateKits(True, True, __setQtVersionForKit__, kitsWithQtVersionName) iterateKits(True, True, __setQtVersionForKit__, kitsWithQtVersionName)
# merge defined target names with their configured Qt versions and devices # merge defined target names with their configured Qt versions and devices
for kit,qtVersion in kitsWithQtVersionName.iteritems(): for kit, qtVersion in kitsWithQtVersionName.iteritems():
if isMaddedDisabled and kit in ('Fremantle', 'Harmattan') and qtVersion == 'None': if isMaddeDisabled and kit in ('Fremantle', 'Harmattan') and qtVersion == 'None':
test.log("Found Kit '%s' with unassigned Qt version (disabled Madde plugin)" % kit) test.log("Found Kit '%s' with unassigned Qt version (disabled Madde plugin)" % kit)
elif qtVersion in qtVersionNames: elif qtVersion in qtVersionNames:
result[kit] = targetsQtVersions[qtVersionNames.index(qtVersion)].items()[0] result[kit] = targetsQtVersions[qtVersionNames.index(qtVersion)].items()[0]

View File

@@ -16,11 +16,9 @@ def main():
placeCursorToLine(cppwindow, "return a.exec();") placeCursorToLine(cppwindow, "return a.exec();")
typeLines(cppwindow, ("<Up>", testData.field(record, "declaration"))) typeLines(cppwindow, ("<Up>", testData.field(record, "declaration")))
type(cppwindow, testData.field(record, "usage")) type(cppwindow, testData.field(record, "usage"))
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", snooze(1) # maybe find something better
"sourceFilesRefreshed(QStringList)")
type(cppwindow, testData.field(record, "operator")) type(cppwindow, testData.field(record, "operator"))
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", waitFor("object.exists(':popupFrame_TextEditor::GenericProposalWidget')", 1500)
"sourceFilesRefreshed(QStringList)")
test.compare(str(lineUnderCursor(cppwindow)).strip(), testData.field(record, "expected")) test.compare(str(lineUnderCursor(cppwindow)).strip(), testData.field(record, "expected"))
invokeMenuItem("File", 'Revert "main.cpp" to Saved') invokeMenuItem("File", 'Revert "main.cpp" to Saved')
clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton")) clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton"))