Merge remote-tracking branch 'origin/3.0'

This commit is contained in:
Eike Ziller
2013-11-20 11:25:36 +01:00
42 changed files with 6049 additions and 6014 deletions

View File

@@ -175,10 +175,24 @@ Component.prototype.createOperations = function()
}
}
function isRoot()
{
if (installer.value("os") == "x11" || installer.value("os") == "mac")
{
var id = installer.execute("/usr/bin/id", new Array("-u"))[0];
id = id.replace(/(\r\n|\n|\r)/gm,"");
if (id === "0")
{
return true;
}
}
return false;
}
Component.prototype.installationFinishedPageIsShown = function()
{
try {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success) {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success && !isRoot()) {
installer.addWizardPageItem( component, "LaunchQtCreatorCheckBoxForm", QInstaller.InstallationFinished );
}
} catch(e) {
@@ -189,7 +203,7 @@ Component.prototype.installationFinishedPageIsShown = function()
Component.prototype.installationFinished = function()
{
try {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success) {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success && !isRoot()) {
var isLaunchQtCreatorCheckBoxChecked = component.userInterface("LaunchQtCreatorCheckBoxForm").launchQtCreatorCheckBox.checked;
if (isLaunchQtCreatorCheckBoxChecked)
installer.executeDetached(component.qtCreatorBinaryPath, new Array(), "@homeDir@");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -363,13 +363,10 @@
\li Select an automatically created kit in the list, and then select
\gui Clone to create a copy of the kit.
\li In the \gui Debugger field, select \gui Edit to change the
automatically detected debugger to LLDB Engine.
\li In the \gui Engine field, select \gui {LLDB Engine}.
\li Select \gui Choose to set the path to the LLDB engine in the
\gui Binary field.
\li In the \gui Debugger field, select an LLDB Engine. If an LLDB Engine
is not listed, select \gui Manage to add it in \gui Tools >
\gui Options > \gui {Build & Run} > \gui Debuggers. For more
information, see \l {Adding Debuggers}.
\li To use the debugger, add the kit in the \gui {Build Settings}
of the project.

View File

@@ -656,20 +656,6 @@
The \gui{Locals and Expressions} view also provides access to the most
powerful feature of the debugger: comprehensive display of data belonging
to Qt's basic objects.
To enable Qt's basic objects data display feature:
\list
\li Select \gui Tools > \gui {Options} > \gui Debugger >
\gui{Debugging Helper} and check the \gui{Use Debugging Helper}
checkbox.
\li The \gui{Locals and Expressions} view is reorganized to provide a
high-level view of the objects.
\endlist
For example, in case of QObject, instead of displaying a pointer to some
private data structure, you see a list of children, signals and slots.
@@ -1183,18 +1169,6 @@
d.putSubItem("key", key)
d.putSubItem("value", value)
\endcode
\section1 Enabling Debugging Helpers for Qt's Bootstrapped Applications
Qt's bootstrapped applications (such as moc and qmake) are built in a way
that is incompatible with the default build of the debugging helpers. To
work around this, add \c{dumper.cpp} to the compiled sources in the
application Makefile.
Choose \gui {Tools > Options > Debugger > Debugging Helper > Use debugging
helper from custom location}, and specify an invalid location, such as
\c{/dev/null}.
*/

View File

@@ -1589,7 +1589,7 @@ class Dumper(DumperBase):
result += ']'
return result
def threadname(self, maximalStackDepth):
def threadname(self, maximalStackDepth, objectPrivateType):
e = gdb.selected_frame()
out = ""
ns = self.qtNamespace()
@@ -1604,8 +1604,7 @@ class Dumper(DumperBase):
or e.name() == "_ZN14QThreadPrivate5startEPv@4":
try:
thrptr = e.read_var("thr").dereference()
obtype = self.lookupType(ns + "QObjectPrivate").pointer()
d_ptr = thrptr["d_ptr"]["d"].cast(obtype).dereference()
d_ptr = thrptr["d_ptr"]["d"].cast(objectPrivateType).dereference()
try:
objectName = d_ptr["objectName"]
except: # Qt 5
@@ -1635,10 +1634,11 @@ class Dumper(DumperBase):
oldthread = gdb.selected_thread()
if oldthread:
try:
objectPrivateType = gdb.lookup_type(ns + "QObjectPrivate").pointer()
inferior = self.selectedInferior()
for thread in inferior.threads():
thread.switch()
out += self.threadname(maximalStackDepth)
out += self.threadname(maximalStackDepth, objectPrivateType)
except:
pass
oldthread.switch()

View File

@@ -9,15 +9,6 @@ DEPLOYMENTFOLDERS = folder_01
# QML_IMPORT_PATH #
QML_IMPORT_PATH =
# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
# CONFIG += mobility
# MOBILITY +=
# Speed up launching on MeeGo/Harmattan when using applauncherd daemon
# HARMATTAN_BOOSTABLE #
# CONFIG += qdeclarative-boostable
# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
@@ -27,5 +18,5 @@ SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
include(qtquick1applicationviewer/qtquick1applicationviewer.pri)
# REMOVE_NEXT_LINE (wizard will remove the include and append deployment.pri to qtquick1applicationviewer.pri, instead) #
include(../shared/deployment.pri)
include(../../shared/deployment.pri)
qtcAddDeployment()

View File

@@ -9,11 +9,6 @@ DEPLOYMENTFOLDERS = folder_01
# QML_IMPORT_PATH #
QML_IMPORT_PATH =
# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
# CONFIG += mobility
# MOBILITY +=
# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
@@ -23,5 +18,5 @@ SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
# REMOVE_NEXT_LINE (wizard will remove the include and append deployment.pri to qmlapplicationviewer.pri, instead) #
include(../shared/deployment.pri)
include(../../shared/deployment.pri)
qtcAddDeployment()

View File

@@ -18,5 +18,5 @@ SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
include(qtquick2controlsapplicationviewer/qtquick2controlsapplicationviewer.pri)
# REMOVE_NEXT_LINE (wizard will remove the include and append deployment.pri to qmlapplicationviewer.pri, instead) #
include(../shared/deployment.pri)
include(../../shared/deployment.pri)
qtcAddDeployment()

View File

@@ -2,5 +2,6 @@ import qbs
CppApplication {
type: "application" // To suppress bundle generation on Mac
consoleApplication: true
files: "main.c"
}

View File

@@ -2,5 +2,6 @@ import qbs
CppApplication {
type: "application" // To suppress bundle generation on Mac
consoleApplication: true
files: "main.cpp"
}

File diff suppressed because it is too large Load Diff

View File

@@ -33,9 +33,10 @@ import widgets 1.0
Rectangle {
id: rectangle1
width: 1024
height: Math.min(3024, parent.height - y)
height: grid.contentHeight + 100
CustomizedGridView {
id: grid
anchors.rightMargin: 38
anchors.bottomMargin: 60
anchors.leftMargin: 38

View File

@@ -33,9 +33,10 @@ import widgets 1.0
Rectangle {
id: rectangle1
width: 1024
height: Math.min(3024, parent.height - y)
height: grid.contentHeight + 100
CustomizedGridView {
id: grid
anchors.rightMargin: 38
anchors.bottomMargin: 60
anchors.leftMargin: 38

View File

@@ -29,43 +29,46 @@
import QtQuick 2.1
import widgets 1.0
import QtQuick.Controls 1.0
Rectangle {
width: 920
height: 600
color: "#edf0f2"
id: root
ScrollView {
id: scrollView
property var fonts: CustomFonts {}
property var colors: CustomColors { }
SideBar {
id: sideBar
model: pagesModel
anchors.top: parent.top
anchors.bottom: parent.bottom
}
Rectangle {
color: "#737373"
width: 1
height: parent.height
width: Math.max(920, scrollView.flickableItem.width - 30)
height: Math.max(loader.height, scrollView.flickableItem.height);
id: root
SideBar {
id: sideBar
model: pagesModel
anchors.top: parent.top
anchors.bottom: parent.bottom
}
Rectangle {
color: "#737373"
width: 1
height: parent.height
anchors.right: sideBar.right
}
QtObject {
id: tab
property int currentIndex: sideBar.currentIndex
}
PageLoader {
id: loader
model: pagesModel
anchors.left: sideBar.right
anchors.right: parent.right
}
anchors.right: sideBar.right
}
QtObject {
id: tab
property int currentIndex: sideBar.currentIndex
}
PageLoader {
anchors.top: parent.top
model: pagesModel
anchors.bottom: parent.bottom
anchors.left: sideBar.right
anchors.right: parent.right
}
}

View File

@@ -30,33 +30,30 @@
import QtQuick 2.1
import QtQuick.Controls 1.0
ScrollView {
GridView {
x: Math.max((width - (cellWidth * columns)) / 2, 0);
property alias model: gridView.model
GridView {
id: gridView
interactive: false
cellHeight: 240
cellWidth: 216
property int columns: Math.max(Math.floor(width / cellWidth), 1)
id: gridView
interactive: false
cellHeight: 240
cellWidth: 216
property int columns: Math.max(Math.floor(width / cellWidth), 1)
delegate: Delegate {
id: delegate
delegate: Delegate {
id: delegate
property bool isHelpImage: model.imageUrl.search(/qthelp/) != -1
property string sourcePrefix: isHelpImage ? "image://helpimage/" : ""
property bool isHelpImage: model.imageUrl.search(/qthelp/) != -1
property string sourcePrefix: isHelpImage ? "image://helpimage/" : ""
property string mockupSource: model.imageSource
property string helpSource: model.imageUrl !== "" ? sourcePrefix + encodeURI(model.imageUrl) : ""
property string mockupSource: model.imageSource
property string helpSource: model.imageUrl !== "" ? sourcePrefix + encodeURI(model.imageUrl) : ""
imageSource: model.imageSource === undefined ? helpSource : mockupSource
videoSource: model.imageSource === undefined ? model.imageUrl : mockupSource
imageSource: model.imageSource === undefined ? helpSource : mockupSource
videoSource: model.imageSource === undefined ? model.imageUrl : mockupSource
caption: model.name;
description: model.description
isVideo: model.isVideo === true
videoLength: model.videoLength !== undefined ? model.videoLength : ""
tags: model.tags
}
caption: model.name;
description: model.description
isVideo: model.isVideo === true
videoLength: model.videoLength !== undefined ? model.videoLength : ""
tags: model.tags
}
}

View File

@@ -34,10 +34,16 @@ Item {
property alias model: repeater.model
height: repeater.height
Repeater {
id: repeater
height: itemAt(tab.currentIndex).height
Loader {
anchors.fill: parent
id: loader
anchors.left: parent.left
anchors.right: parent.right
height: item.height
property bool active: index === tab.currentIndex
property bool wasActive
onActiveChanged: {

View File

@@ -35,7 +35,7 @@ Column {
spacing: 16
signal itemChanged
property int currentIndex: 0
property int currentIndex: -1
onCurrentIndexChanged: welcomeMode.activePlugin = currentIndex
Component.onCompleted: currentIndex = welcomeMode.activePlugin

View File

@@ -107,10 +107,8 @@ public:
~AnalyzerMode()
{
// Make sure the editor manager does not get deleted.
delete m_widget;
m_widget = 0;
EditorManager::instance()->setParent(0);
}
};

View File

@@ -248,6 +248,7 @@ void AndroidConfigurations::updateAvailableSdkPlatforms()
m_availableSdkPlatforms.clear();
QProcess proc;
proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment());
proc.start(androidToolPath().toString(), QStringList() << QLatin1String("list") << QLatin1String("target")); // list avaialbe AVDs
if (!proc.waitForFinished(-1)) {
proc.terminate();
@@ -283,6 +284,14 @@ FileName AndroidConfigurations::adbToolPath() const
return path.appendPath(QLatin1String("platform-tools/adb" QTC_HOST_EXE_SUFFIX));
}
Utils::Environment AndroidConfigurations::androidToolEnvironment() const
{
Utils::Environment env = Utils::Environment::systemEnvironment();
if (!m_config.openJDKLocation.isEmpty())
env.set(QLatin1String("JAVA_HOME"), m_config.openJDKLocation.toUserOutput());
return env;
}
FileName AndroidConfigurations::androidToolPath() const
{
if (HostOsInfo::isWindowsHost()) {
@@ -524,6 +533,7 @@ QString AndroidConfigurations::createAVD(int minApiLevel, QString targetArch) co
QString AndroidConfigurations::createAVD(const QString &target, const QString &name, const QString &abi, int sdcardSize ) const
{
QProcess proc;
proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment());
proc.start(androidToolPath().toString(),
QStringList() << QLatin1String("create") << QLatin1String("avd")
<< QLatin1String("-t") << target
@@ -565,6 +575,7 @@ QString AndroidConfigurations::createAVD(const QString &target, const QString &n
bool AndroidConfigurations::removeAVD(const QString &name) const
{
QProcess proc;
proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment());
proc.start(androidToolPath().toString(),
QStringList() << QLatin1String("delete") << QLatin1String("avd")
<< QLatin1String("-n") << name);
@@ -579,6 +590,7 @@ QVector<AndroidDeviceInfo> AndroidConfigurations::androidVirtualDevices() const
{
QVector<AndroidDeviceInfo> devices;
QProcess proc;
proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment());
proc.start(androidToolPath().toString(),
QStringList() << QLatin1String("list") << QLatin1String("avd")); // list available AVDs
if (!proc.waitForFinished(-1)) {
@@ -715,7 +727,7 @@ bool AndroidConfigurations::isBootToQt(const QString &device) const
adbProc.start(adbToolPath().toString(), arguments);
if (!adbProc.waitForFinished(-1)) {
adbProc.kill();
return -1;
return false;
}
return adbProc.readAll().contains("Boot2Qt");
}

View File

@@ -39,6 +39,7 @@
#include <QFutureInterface>
#include <projectexplorer/abi.h>
#include <utils/fileutils.h>
#include <utils/environment.h>
QT_BEGIN_NAMESPACE
class QSettings;
@@ -90,6 +91,7 @@ public:
QStringList sdkTargets(int minApiLevel = 0) const;
Utils::FileName adbToolPath() const;
Utils::FileName androidToolPath() const;
Utils::Environment androidToolEnvironment() const;
Utils::FileName antToolPath() const;
Utils::FileName emulatorToolPath() const;
Utils::FileName gccPath(ProjectExplorer::Abi::Architecture architecture, const QString &ndkToolChainVersion) const;

View File

@@ -706,6 +706,7 @@ void AndroidManager::updateTarget(ProjectExplorer::Target *target, const QString
params << QLatin1String("-t") << targetSDK;
if (!name.isEmpty())
params << QLatin1String("-n") << name;
androidProc.setProcessEnvironment(AndroidConfigurations::instance().androidToolEnvironment().toProcessEnvironment());
androidProc.start(AndroidConfigurations::instance().androidToolPath().toString(), params);
if (!androidProc.waitForFinished(-1))
androidProc.terminate();

View File

@@ -35,6 +35,10 @@
#include "androidconstants.h"
#include "androidtoolchain.h"
#ifdef Q_OS_WIN
#include <utils/winutils.h>
#endif
#include <utils/environment.h>
#include <utils/hostosinfo.h>
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/kitmanager.h>
@@ -434,8 +438,12 @@ void AndroidSettingsWidget::manageAVD()
QProcess *avdProcess = new QProcess();
connect(this, SIGNAL(destroyed()), avdProcess, SLOT(deleteLater()));
connect(avdProcess, SIGNAL(finished(int)), avdProcess, SLOT(deleteLater()));
avdProcess->start(AndroidConfigurations::instance().androidToolPath().toString(),
QStringList() << QLatin1String("avd"));
avdProcess->setProcessEnvironment(AndroidConfigurations::instance().androidToolEnvironment().toProcessEnvironment());
QString executable = AndroidConfigurations::instance().androidToolPath().toString();
QStringList arguments = QStringList() << QLatin1String("avd");
avdProcess->start(executable, arguments);
}

View File

@@ -382,6 +382,7 @@ void SettingsDialog::createGui()
headerHLayout->addWidget(m_headerLabel);
m_stackedLayout->setMargin(0);
m_stackedLayout->addWidget(new QWidget); // no category selected, for example when filtering
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok |
QDialogButtonBox::Apply |
@@ -467,6 +468,7 @@ void SettingsDialog::disconnectTabWidgets()
void SettingsDialog::updateEnabledTabs(Category *category, const QString &searchText)
{
int firstEnabledTab = -1;
for (int i = 0; i < category->pages.size(); ++i) {
const IOptionsPage *page = category->pages.at(i);
const bool enabled = searchText.isEmpty()
@@ -474,13 +476,24 @@ void SettingsDialog::updateEnabledTabs(Category *category, const QString &search
|| page->displayName().contains(searchText, Qt::CaseInsensitive)
|| page->matches(searchText);
category->tabWidget->setTabEnabled(i, enabled);
if (enabled && firstEnabledTab < 0)
firstEnabledTab = i;
}
if (!category->tabWidget->isTabEnabled(category->tabWidget->currentIndex())
&& firstEnabledTab != -1) {
// QTabWidget is dumb, so this can happen
category->tabWidget->setCurrentIndex(firstEnabledTab);
}
}
void SettingsDialog::currentChanged(const QModelIndex &current)
{
if (current.isValid())
if (current.isValid()) {
showCategory(m_proxyModel->mapToSource(current).row());
} else {
m_stackedLayout->setCurrentIndex(0);
m_headerLabel->setText(QString());
}
}
void SettingsDialog::currentTabChanged(int index)

View File

@@ -93,8 +93,6 @@ EditMode::EditMode() :
EditMode::~EditMode()
{
// Make sure the editor manager does not get deleted
EditorManager::instance()->setParent(0);
delete m_splitter;
}

View File

@@ -37,7 +37,7 @@
#include <QStyle>
#include <QPainter>
#include <QFileInfo>
#include <QPair>
#include <QHash>
#include <QDebug>
#include <QFileIconProvider>
@@ -68,9 +68,6 @@ namespace FileIconProvider {
enum { debug = 0 };
typedef QPair<QString, QIcon> StringIconPair;
typedef QList<StringIconPair> StringIconPairList;
class FileIconProviderImplementation : public QFileIconProvider
{
public:
@@ -89,15 +86,8 @@ public:
QTC_ASSERT(!icon.isNull() && !suffix.isEmpty(), return);
const QPixmap fileIconPixmap = FileIconProvider::overlayIcon(QStyle::SP_FileIcon, icon, QSize(16, 16));
// replace old icon, if it exists
for (int i = 0, n = m_cache.size(); i != n; ++i) {
if (m_cache.at(i).first == suffix) {
m_cache[i].second = fileIconPixmap;
return;
}
}
m_cache.append(StringIconPair(suffix, fileIconPixmap));
m_cache.insert(suffix, fileIconPixmap);
}
void registerIconOverlayForMimeType(const QIcon &icon, const MimeType &mimeType)
@@ -107,7 +97,7 @@ public:
}
// Mapping of file suffix to icon.
StringIconPairList m_cache;
QHash<QString, QIcon> m_cache;
QIcon m_unknownFileIcon;
};
@@ -130,10 +120,8 @@ QIcon FileIconProviderImplementation::icon(const QFileInfo &fileInfo) const
// Check for cached overlay icons by file suffix.
if (!m_cache.isEmpty() && !fileInfo.isDir()) {
const QString suffix = fileInfo.suffix();
if (!suffix.isEmpty()) {
for (int i = 0, n = m_cache.size(); i != n; ++i)
if (m_cache.at(i).first == suffix)
return m_cache[i].second;
if (!suffix.isEmpty() && m_cache.contains(suffix)) {
return m_cache.value(suffix);
}
}
// Get icon from OS.

View File

@@ -277,6 +277,9 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
const QChar slash = QLatin1Char('/');
const StringVersionControlPairs::const_iterator cend = allThatCanManage.constEnd();
for (StringVersionControlPairs::const_iterator i = allThatCanManage.constBegin(); i != cend; ++i) {
// If topLevel was already cached for another VC, skip this one
if (tmpDir.count() < i->first.count())
continue;
d->cache(i->second, i->first, tmpDir);
tmpDir = i->first;
const int slashPos = tmpDir.lastIndexOf(slash);

View File

@@ -95,63 +95,27 @@ private slots:
#ifdef WITH_TESTS
private slots:
// The following tests expect that no projects are loaded on start-up.
void test_SwitchMethodDeclarationDefinition_fromFunctionDeclarationSymbol();
void test_SwitchMethodDeclarationDefinition_fromFunctionDefinitionSymbol();
void test_SwitchMethodDeclarationDefinition_fromFunctionBody();
void test_SwitchMethodDeclarationDefinition_fromReturnType();
void test_SwitchMethodDeclarationDefinition_data();
void test_SwitchMethodDeclarationDefinition();
void test_FollowSymbolUnderCursor_data();
void test_FollowSymbolUnderCursor();
void test_FollowSymbolUnderCursor_globalVarFromFunction();
void test_FollowSymbolUnderCursor_funLocalVarHidesClassMember();
void test_FollowSymbolUnderCursor_funLocalVarHidesNamespaceMemberIntroducedByUsingDirective();
void test_FollowSymbolUnderCursor_loopLocalVarHidesOuterScopeVariable1();
void test_FollowSymbolUnderCursor_loopLocalVarHidesOuterScopeVariable2();
void test_FollowSymbolUnderCursor_subsequentDefinedClassMember();
void test_FollowSymbolUnderCursor_classMemberHidesOuterTypeDef();
void test_FollowSymbolUnderCursor_globalVarFromEnum();
void test_FollowSymbolUnderCursor_selfInitialization();
void test_FollowSymbolUnderCursor_pointerToClassInClassDefinition();
void test_FollowSymbolUnderCursor_previouslyDefinedMemberFromArrayDefinition();
void test_FollowSymbolUnderCursor_outerStaticMemberVariableFromInsideSubclass();
void test_FollowSymbolUnderCursor_memberVariableFollowingDotOperator();
void test_FollowSymbolUnderCursor_memberVariableFollowingArrowOperator();
void test_FollowSymbolUnderCursor_staticMemberVariableFollowingScopeOperator();
void test_FollowSymbolUnderCursor_staticMemberVariableFollowingDotOperator();
void test_FollowSymbolUnderCursor_staticMemberVariableFollowingArrowOperator();
void test_FollowSymbolUnderCursor_previouslyDefinedEnumValueFromInsideEnum();
void test_FollowSymbolUnderCursor_nsMemberHidesNsMemberIntroducedByUsingDirective();
void test_FollowSymbolUnderCursor_baseClassFunctionIntroducedByUsingDeclaration();
void test_FollowSymbolUnderCursor_funWithSameNameAsBaseClassFunIntroducedByUsingDeclaration();
void test_FollowSymbolUnderCursor_funLocalVarHidesOuterClass();
void test_FollowSymbolUnderCursor_classConstructor();
void test_FollowSymbolUnderCursor_classDestructor();
void test_FollowSymbolUnderCursor_QObject_connect_data();
void test_FollowSymbolUnderCursor_QObject_connect();
void test_FollowSymbolUnderCursor_classOperator_onOperatorToken_data();
void test_FollowSymbolUnderCursor_classOperator_onOperatorToken();
void test_FollowSymbolUnderCursor_classOperator_data();
void test_FollowSymbolUnderCursor_classOperator();
void test_FollowSymbolUnderCursor_classOperator_inOp_data();
void test_FollowSymbolUnderCursor_classOperator_inOp();
void test_FollowSymbolUnderCursor_using_QTCREATORBUG7903_globalNamespace();
void test_FollowSymbolUnderCursor_using_QTCREATORBUG7903_namespace();
void test_FollowSymbolUnderCursor_using_QTCREATORBUG7903_insideFunction();
void test_FollowSymbolUnderCursor_virtualFunctionCall_allOverrides();
void test_FollowSymbolUnderCursor_virtualFunctionCall_possibleOverrides1();
void test_FollowSymbolUnderCursor_virtualFunctionCall_possibleOverrides2();
void test_FollowSymbolUnderCursor_virtualFunctionCall_fallbackToDeclaration();
void test_FollowSymbolUnderCursor_virtualFunctionCall_itemOrder();
void test_FollowSymbolUnderCursor_virtualFunctionCall_instantiatedSymbols();
void test_FollowSymbolUnderCursor_virtualFunctionCall_QSharedPointer();
void test_FollowSymbolUnderCursor_virtualFunctionCall_multipeDocuments();
void test_FollowSymbolUnderCursor_virtualFunctionCall_noSiblings_references();
void test_FollowSymbolUnderCursor_virtualFunctionCall_noSiblings_pointers();
void test_FollowSymbolUnderCursor_virtualFunctionCall_noSiblings_noBaseExpression();
void test_FollowSymbolUnderCursor_virtualFunctionCall_onDotMemberAccessOfReferenceTypes();
void test_FollowSymbolUnderCursor_virtualFunctionCall_notOnDotMemberAccessOfNonReferenceType();
void test_FollowSymbolUnderCursor_virtualFunctionCall_notOnQualified();
void test_FollowSymbolUnderCursor_virtualFunctionCall_notOnDeclaration();
void test_FollowSymbolUnderCursor_virtualFunctionCall_notOnDefinition();
void test_FollowSymbolUnderCursor_virtualFunctionCall_notOnNonPointerNonReference();
void test_FollowSymbolUnderCursor_virtualFunctionCall_data();
void test_FollowSymbolUnderCursor_virtualFunctionCall();
void test_FollowSymbolUnderCursor_virtualFunctionCall_multipleDocuments();
void test_doxygen_comments_qt_style();
void test_doxygen_comments_qt_style_continuation();

View File

@@ -165,6 +165,7 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor
CppEditorSupport::~CppEditorSupport()
{
m_documentParser.cancel();
m_highlighter.cancel();
m_futureSemanticInfo.cancel();
@@ -278,13 +279,15 @@ void CppEditorSupport::updateDocument()
m_updateDocumentTimer->start(m_updateDocumentInterval);
}
static void parse(QFutureInterface<void> &future, CppEditorSupport *support)
static void parse(QFutureInterface<void> &future, QSharedPointer<SnapshotUpdater> updater)
{
future.setProgressRange(0, 1);
if (future.isCanceled()) {
future.setProgressValue(1);
return;
}
CppModelManager *cmm = qobject_cast<CppModelManager *>(CppModelManager::instance());
QSharedPointer<SnapshotUpdater> updater = support->snapshotUpdater();
updater->update(cmm->workingCopy());
cmm->finishedRefreshingSourceFiles(QStringList(updater->fileInEditor()));
@@ -304,7 +307,7 @@ void CppEditorSupport::updateDocumentNow()
if (m_highlightingSupport && !m_highlightingSupport->requiresSemanticInfo())
startHighlighting();
m_documentParser = QtConcurrent::run(&parse, this);
m_documentParser = QtConcurrent::run(&parse, snapshotUpdater());
}
}

View File

@@ -513,8 +513,6 @@ public:
~DebugMode()
{
// Make sure the editor manager does not get deleted.
//EditorManager::instance()->setParent(0);
delete m_widget;
}
};

View File

@@ -36,6 +36,7 @@
#include <utils/qtcassert.h>
#include <QDebug>
#include <QSortFilterProxyModel>
namespace Debugger {
namespace Internal {
@@ -136,8 +137,8 @@ ThreadsHandler::ThreadsHandler()
{
m_resetLocationScheduled = false;
setObjectName(QLatin1String("ThreadsModel"));
// m_proxyModel = new QSortFilterProxyModel(this);
// m_proxyModel->setSourceModel(this);
m_proxyModel = new QSortFilterProxyModel(this);
m_proxyModel->setSourceModel(this);
}
int ThreadsHandler::currentThreadIndex() const
@@ -489,8 +490,7 @@ void ThreadsHandler::resetLocation()
QAbstractItemModel *ThreadsHandler::model()
{
return this;
//return m_proxyModel;
return m_proxyModel;
}
} // namespace Internal

View File

@@ -101,8 +101,7 @@ private:
const QIcon m_emptyIcon;
bool m_resetLocationScheduled;
//QSortFilterProxyModel *m_proxyModel;
QSortFilterProxyModel *m_proxyModel;
};
} // namespace Internal

View File

@@ -216,8 +216,13 @@ void BuildManager::cancel()
return;
d->m_canceling = true;
d->m_watcher.cancel();
if (d->m_currentBuildStep->runInGuiThread())
if (d->m_currentBuildStep->runInGuiThread()) {
d->m_currentBuildStep->cancel();
while (d->m_canceling)
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
} else {
d->m_watcher.waitForFinished();
}
}
}

View File

@@ -35,6 +35,7 @@
#include <utils/environment.h>
#include <utils/qtcassert.h>
#include <QCoreApplication>
#include <QStringList>
#include <QTimer>
@@ -86,6 +87,7 @@ void DeviceApplicationRunner::start(const IDevice::ConstPtr &device,
{
QTC_ASSERT(d->state == Inactive, return);
d->state = Run;
if (!device) {
emit reportError(tr("Cannot run: No device."));
setFinished();
@@ -98,10 +100,16 @@ void DeviceApplicationRunner::start(const IDevice::ConstPtr &device,
return;
}
if (command.isEmpty()) {
emit reportError(QCoreApplication::translate("RemoteLinux::RemoteLinuxRunConfiguration",
"Don't know what to run.")); // FIXME: Transitional message for 3.0.
setFinished();
return;
}
d->stopRequested = false;
d->success = true;
d->state = Run;
d->deviceProcess = device->createProcess(this);
connect(d->deviceProcess, SIGNAL(started()), SIGNAL(remoteProcessStarted()));
connect(d->deviceProcess, SIGNAL(readyReadStandardOutput()), SLOT(handleRemoteStdout()));

View File

@@ -366,15 +366,13 @@ void ItemLibraryWidget::setResourcePath(const QString &resourcePath)
void ItemLibraryWidget::startDragAndDrop(int itemLibId)
{
QMimeData *mimeData = m_itemLibraryModel->getMimeData(itemLibId);
CustomItemLibraryDrag *drag = new CustomItemLibraryDrag(this);
QDrag *drag = new QDrag(this);
const QImage image = qvariant_cast<QImage>(mimeData->imageData());
drag->setPixmap(m_itemLibraryModel->getIcon(itemLibId).pixmap(32, 32));
drag->setPreview(QPixmap::fromImage(image));
drag->setMimeData(mimeData);
QQuickItem *rootItem = qobject_cast<QQuickItem*>(m_itemsView->rootObject());
connect(rootItem, SIGNAL(stopDragAndDrop()), drag, SLOT(stopDrag()));
drag->exec();
}

View File

@@ -69,7 +69,7 @@ void QmlProfilerCanvas::draw()
m_context2d->reset();
m_context2d->setSize(width(), height());
if (width() != 0 && height() != 0)
if (width() > 0 && height() > 0)
emit drawRegion(m_context2d, QRect(0, 0, width(), height()));
update();
}

View File

@@ -303,8 +303,7 @@ Rectangle {
Flickable {
id: vertflick
flickableDirection: Flickable.VerticalFlick
width: parent.width
height: root.height
anchors.fill: parent
clip: true
contentHeight: labels.height
boundsBehavior: Flickable.StopAtBounds
@@ -318,8 +317,8 @@ Rectangle {
id: backgroundMarks
y: vertflick.contentY
height: vertflick.height
width: flick.width
anchors.left: flick.left
anchors.right: parent.right
anchors.left: labels.right
}
Flickable {

View File

@@ -220,6 +220,13 @@ void BlackBerrySetupWizardCertificatePage::validate()
return;
}
if (m_ui->password->text().size() < 6) {
// TODO: Use tr() once string freeze is over
m_ui->status->setText(QCoreApplication::translate("Qnx::Internal::BlackBerryCreateCertificateDialog", "Password must be at least 6 characters long."));
setComplete(false);
return;
}
m_ui->status->clear();
setComplete(true);
}

View File

@@ -120,11 +120,6 @@ void RemoteLinuxRunConfiguration::init()
bool RemoteLinuxRunConfiguration::isEnabled() const
{
if (remoteExecutableFilePath().isEmpty()) {
d->disabledReason = tr("Don't know what to run.");
return false;
}
d->disabledReason.clear();
return true;
}

View File

@@ -165,15 +165,9 @@ WelcomeMode::WelcomeMode() :
styledBar->setObjectName(QLatin1String("WelcomePageStyledBar"));
layout->addWidget(styledBar);
QScrollArea *scrollArea = new QScrollArea(m_modeWidget);
scrollArea->setFrameShape(QFrame::NoFrame);
scrollArea->setWidgetResizable(true);
QWidget *container = QWidget::createWindowContainer(m_welcomePage, scrollArea);
container->setMinimumSize(QSize(880, 548));
scrollArea->setWidget(container);
QWidget *container = QWidget::createWindowContainer(m_welcomePage, m_modeWidget);
m_modeWidget->setLayout(layout);
layout->addWidget(scrollArea);
layout->addWidget(container);
connect(PluginManager::instance(), SIGNAL(objectAdded(QObject*)), SLOT(welcomePluginAdded(QObject*)));

View File

@@ -60,7 +60,9 @@ void tst_gdb::version()
bool qnx = true;
Debugger::Internal::extractGdbVersion(msg, &v, &bv, &mac, &qnx);
//qDebug() << msg << " -> " << v << bv << mac << qnx;
QEXPECT_FAIL("openSUSE 13.1", "Not done yet", Continue);
QCOMPARE(v, gdbVersion);
QEXPECT_FAIL("openSUSE 13.1", "Not done yet", Continue);
QCOMPARE(bv, gdbBuildVersion);
QCOMPARE(mac, isMacGdb);
QCOMPARE(qnx, isQnxGdb);
@@ -117,6 +119,10 @@ void tst_gdb::version_data()
QTest::newRow("rubenvb")
<< "GNU gdb (rubenvb-4.7.2-release) 7.5.50.20120920-cvs"
<< 70550 << 20120920 << false << false;
QTest::newRow("openSUSE 13.1")
<< "GNU gdb (GDB; openSUSE 13.1) 7.6.50.20130731-cvs"
<< 70650 << 20130731 << false << false;
}
static QString chopConst(QString type)