forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.6'
Conflicts: qtcreator.pri qtcreator.qbs src/plugins/android/androidrunner.cpp src/plugins/projectexplorer/kitmanager.cpp Change-Id: I653ddaef6e341818fc74aacfe30e89c07f40a8c6
This commit is contained in:
166
dist/changes-2.6.1
vendored
Normal file
166
dist/changes-2.6.1
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
Qt Creator version 2.6.1 is a bugfix release.
|
||||
|
||||
The most important changes are listed in this document. For a complete
|
||||
list of changes, see the Git log for the Qt Creator sources that
|
||||
you can check out from the public Git repository. For example:
|
||||
|
||||
git clone git://gitorious.org/qt-creator/qt-creator.git
|
||||
git log --cherry-pick --pretty=oneline v2.6.0..v2.6.1
|
||||
|
||||
General
|
||||
* Fixed opening files ending in "++" (QTCREATORBUG-8272)
|
||||
|
||||
Editing
|
||||
* Fixed freeze when searching for certain regular expressions in a selected
|
||||
block (QTCREATORBUG-8159)
|
||||
|
||||
Managing Projects
|
||||
* Fixed setting the default kit (QTCREATORBUG-8205)
|
||||
* Fixed several crashes when managing kits
|
||||
* Fixed cloning of auto-detected kits (QTCREATORBUG-8231)
|
||||
|
||||
QMake Projects
|
||||
|
||||
CMake Projects
|
||||
* Fixed a crash when selecting kit without tool chain when opening project
|
||||
|
||||
Debugging
|
||||
* Fixed connection problems when remotely attaching to a running application
|
||||
|
||||
Debugging QML/JS
|
||||
* Fixed remote QML debugging which ignored the kit settings
|
||||
* Fixed that locals and expressions could become disabled (QTCREATORBUG-8167)
|
||||
|
||||
Analyzing Code
|
||||
|
||||
C++ Support
|
||||
* Fixed code completion for Qt containers (QTCREATORBUG-8228)
|
||||
|
||||
QML/JS Support
|
||||
* Fixed the warning about missing QmlViewer in Qt 5 (QTCREATORBUG-8187)
|
||||
* Split up Qt Quick wizards into Qt Quick 1 and Qt Quick 2 versions
|
||||
(QTCREATORBUG-8236, QTCREATORBUG-8269)
|
||||
|
||||
GLSL Support
|
||||
|
||||
Qt Quick Designer
|
||||
* Removed a confusing warning about qml2puppet not being found (QTCREATORBUG-7858)
|
||||
|
||||
Help
|
||||
|
||||
Qt Designer
|
||||
|
||||
Version control plugins
|
||||
|
||||
Git
|
||||
* Fixed detection of Git version with 2-digit patch number
|
||||
SVN
|
||||
|
||||
FakeVim
|
||||
|
||||
Platform Specific
|
||||
|
||||
Mac
|
||||
* Fixed missing interface languages (QTCREATORBUG-8244)
|
||||
* Added missing QWebView and other widgets to Qt Designer (QTCREATORBUG-8256)
|
||||
* Fixed layout issues in preferences (QTCREATORBUG-8345)
|
||||
|
||||
Linux (GNOME and KDE)
|
||||
|
||||
Windows
|
||||
* Fixed Windows SDK 7.1 compiler detection
|
||||
* Fixed empty welcome screen when running from incorrectly capitalized
|
||||
application directory (QTCREATORBUG-6126)
|
||||
|
||||
Symbian Target
|
||||
|
||||
Remote Linux Support
|
||||
|
||||
Madde
|
||||
|
||||
Credits go to:
|
||||
Aleksey Sidorov
|
||||
Alessandro Portale
|
||||
Andreas Holzammer
|
||||
Andre Hartmann
|
||||
André Pönitz
|
||||
Aurélien Gâteau
|
||||
Aurindam Jana
|
||||
axasia
|
||||
Bill King
|
||||
BogDan Vatra
|
||||
Bojan Petrovic
|
||||
Bradley T. Hughes
|
||||
Campbell Barton
|
||||
Casper van Donderen
|
||||
Christiaan Janssen
|
||||
Christian Kamm
|
||||
Christian Kandeler
|
||||
Christian Stenger
|
||||
cnavarro
|
||||
Daniel Molkentin
|
||||
Daniel Teske
|
||||
David Schulz
|
||||
Dmitry Savchenko
|
||||
Eike Ziller
|
||||
Erik Verbruggen
|
||||
Fawzi Mohamed
|
||||
Flex Ferrum
|
||||
Francois Ferrand
|
||||
Franklin Weng
|
||||
Friedemann Kleint
|
||||
hluk
|
||||
Hugues Delorme
|
||||
Jarek Kobus
|
||||
Jędrzej Nowacki
|
||||
Jörg Bornemann
|
||||
Jonathan Liu
|
||||
Juei-ray Tseng
|
||||
Juhapekka Piiroinen
|
||||
Kaffeine
|
||||
Kai Köhne
|
||||
Kevin Krammer
|
||||
Karsten Heimrich
|
||||
Knut Petter Svendsen
|
||||
Konstantin Ritt
|
||||
Konstantin Tokarev
|
||||
Leandro Melo
|
||||
Leena Miettinen
|
||||
Lukas Geyer
|
||||
Lukas Holecek
|
||||
Marc Mutz
|
||||
Marco Bubke
|
||||
Marius Storm-Olsen
|
||||
Martin Aumüller
|
||||
Mathias Hasselmann
|
||||
Mehdi Fekari
|
||||
Montel Laurent
|
||||
Morten Johan Sorvig
|
||||
Nicolas Arnaud-Cormos
|
||||
Nikolai Kosjar
|
||||
Orgad Shaneh
|
||||
Oswald Buddenhagen
|
||||
Oto Magaldadze
|
||||
Peter Kümmel
|
||||
Pierre Rossi
|
||||
Przemyslaw Gorszkowski
|
||||
raidsan
|
||||
Robert Löhning
|
||||
Ryan May
|
||||
Sergey Belyashov
|
||||
Sergey Shambir
|
||||
Sergio Ahumada
|
||||
Simjees Abraham
|
||||
Stephen Kelly
|
||||
Takumi Asaki
|
||||
Theo J.A. de Vries
|
||||
Thiago Macieira
|
||||
Thomas Hartmann
|
||||
Thorbjørn Lindeijer
|
||||
Tim Jenssen
|
||||
Tobias Hunger
|
||||
Tobias Nätterlund
|
||||
Tommi Asp
|
||||
Tyler Mandry
|
||||
Vladislav Navrocky
|
||||
Yuchen Deng
|
@@ -19,9 +19,12 @@ OTHER_FILES += dist/copyright_template.txt \
|
||||
qtcreator.qbp \
|
||||
qbs/pluginspec/pluginspec.qbs
|
||||
|
||||
contains(QT_ARCH, i386): ARCHITECTURE = x86
|
||||
else: ARCHITECTURE = $$QT_ARCH
|
||||
|
||||
macx: PLATFORM = "mac"
|
||||
else:win32: PLATFORM = "windows"
|
||||
else:linux-*: PLATFORM = "linux-$${QT_ARCH}"
|
||||
else:linux-*: PLATFORM = "linux-$${ARCHITECTURE}"
|
||||
else: PLATFORM = "unknown"
|
||||
|
||||
PATTERN = $${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)
|
||||
|
@@ -71,7 +71,7 @@ void AndroidRunControl::start()
|
||||
|
||||
RunControl::StopResult AndroidRunControl::stop()
|
||||
{
|
||||
m_runner->stop();
|
||||
m_runner->stop(true);
|
||||
return StoppedSynchronously;
|
||||
}
|
||||
|
||||
|
@@ -68,7 +68,7 @@ AndroidRunner::AndroidRunner(QObject *parent, AndroidRunConfiguration *runConfig
|
||||
|
||||
AndroidRunner::~AndroidRunner()
|
||||
{
|
||||
stop();
|
||||
stop(false);
|
||||
}
|
||||
|
||||
void AndroidRunner::checkPID()
|
||||
@@ -248,7 +248,7 @@ void AndroidRunner::startLogcat()
|
||||
emit remoteProcessStarted(5039);
|
||||
}
|
||||
|
||||
void AndroidRunner::stop()
|
||||
void AndroidRunner::stop(bool async)
|
||||
{
|
||||
QMutexLocker locker(&m_mutex);
|
||||
m_adbLogcatProcess.kill();
|
||||
@@ -256,6 +256,14 @@ void AndroidRunner::stop()
|
||||
m_checkPIDTimer.stop();
|
||||
if (m_processPID == -1)
|
||||
return; // don't emit another signal
|
||||
if (async)
|
||||
QtConcurrent::run(this, &AndroidRunner::asyncStop);
|
||||
else
|
||||
asyncStop();
|
||||
}
|
||||
|
||||
void AndroidRunner::asyncStop()
|
||||
{
|
||||
killPID();
|
||||
emit remoteProcessFinished(tr("\n\n'%1' killed.").arg(m_packageName));
|
||||
}
|
||||
|
@@ -55,7 +55,8 @@ public:
|
||||
|
||||
public slots:
|
||||
void start();
|
||||
void stop();
|
||||
void stop(bool async);
|
||||
void asyncStop();
|
||||
|
||||
signals:
|
||||
void remoteProcessStarted(int gdbServerPort = -1, int qmlPort = -1);
|
||||
|
@@ -218,7 +218,7 @@ public:
|
||||
bool open(QString *errorString, const QString &fileName, quint64 offset = 0) {
|
||||
QFile file(fileName);
|
||||
quint64 size = static_cast<quint64>(file.size());
|
||||
if (size == 0) {
|
||||
if (size == 0 && !fileName.isEmpty()) {
|
||||
QString msg = tr("The Binary Editor cannot open empty files.");
|
||||
if (errorString)
|
||||
*errorString = msg;
|
||||
|
@@ -32,7 +32,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="txtComment"/>
|
||||
<widget class="QPlainTextEdit" name="txtComment">
|
||||
<property name="tabChangesFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkReserved">
|
||||
|
@@ -343,7 +343,7 @@ void CppAssistProposalItem::applyContextualContent(TextEditor::BaseTextEditor *e
|
||||
if (!inEditor.isEmpty()) {
|
||||
preserveLength = toInsert.length() - (editor->position() - basePosition);
|
||||
const int inEditorLength = inEditor.length();
|
||||
while (preserveLength) {
|
||||
while (preserveLength > 0) {
|
||||
if (inEditor.startsWith(toInsert.right(preserveLength))
|
||||
&& (inEditorLength == preserveLength
|
||||
|| (!inEditor.at(preserveLength).isLetterOrNumber()
|
||||
|
@@ -24,9 +24,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
<argumentList>
|
||||
<argument name=\"-debug\" parameter=\"pid\">Attach to local process</argument>
|
||||
<argument name=\"-debug\" parameter=\"executable\">Start and debug executable</argument>
|
||||
<argument name=\"-debug [executable,]core=<corefile>[,sysroot=<sysroot>]\">
|
||||
<argument name=\"-debug [executable,]core=<corefile>[,kit=<kit>]\">
|
||||
Attach to core file</argument>
|
||||
<argument name=\"-debug <executable>,server=<server:port>[,sysroot=<sysroot>][,arch=<arch>]\">
|
||||
<argument name=\"-debug <executable>,server=<server:port>[,kit=<kit>]\">
|
||||
Attach to remote debug server</argument>
|
||||
<argument name=\"-wincrashevent\"
|
||||
parameter=\"eventhandle:pid\">
|
||||
|
@@ -1276,6 +1276,9 @@ static void showQtDumperLibraryWarning(const QString &details)
|
||||
"expand the Details section and click Build All."));
|
||||
if (!details.isEmpty())
|
||||
dialog.setDetailedText(details);
|
||||
#if defined(Q_OS_MAC) && QT_VERSION >= 0x050000
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
#endif
|
||||
dialog.exec();
|
||||
if (dialog.clickedButton() == qtPref) {
|
||||
Core::ICore::showOptionsDialog(
|
||||
|
@@ -153,7 +153,7 @@ QString AbstractMsvcToolChain::makeCommand(const Utils::Environment &environment
|
||||
|
||||
Utils::FileName AbstractMsvcToolChain::compilerCommand() const
|
||||
{
|
||||
Utils::Environment env;
|
||||
Utils::Environment env = Utils::Environment::systemEnvironment();
|
||||
addToEnvironment(env);
|
||||
return Utils::FileName::fromString(env.searchInPath(QLatin1String("cl.exe")));
|
||||
}
|
||||
|
@@ -135,6 +135,8 @@ void DeviceManager::copy(const DeviceManager *source, DeviceManager *target, boo
|
||||
|
||||
void DeviceManager::save()
|
||||
{
|
||||
if (d->clonedInstance == this)
|
||||
return;
|
||||
QVariantMap data;
|
||||
data.insert(QLatin1String(DeviceManagerKey), toMap());
|
||||
d->writer->save(data, Core::ICore::mainWindow());
|
||||
@@ -341,6 +343,7 @@ DeviceManager::DeviceManager(bool isInstance) : d(new DeviceManagerPrivate)
|
||||
|
||||
DeviceManager::~DeviceManager()
|
||||
{
|
||||
if (d->clonedInstance != this)
|
||||
delete d->writer;
|
||||
delete d;
|
||||
}
|
||||
|
@@ -89,8 +89,7 @@ public:
|
||||
};
|
||||
|
||||
KitManagerPrivate::KitManagerPrivate()
|
||||
: m_defaultKit(0), m_initialized(false),
|
||||
m_writer(0)
|
||||
: m_defaultKit(0), m_initialized(false), m_writer(0)
|
||||
{ }
|
||||
|
||||
KitManagerPrivate::~KitManagerPrivate()
|
||||
@@ -131,7 +130,15 @@ KitManager::KitManager(QObject *parent) :
|
||||
|
||||
void KitManager::restoreKits()
|
||||
{
|
||||
QTC_ASSERT(!d->m_writer, return);
|
||||
QTC_ASSERT(!d->m_initialized, return);
|
||||
static bool initializing = false;
|
||||
|
||||
if (initializing) // kits will call kits() to check their display names, which will trigger another
|
||||
// call to restoreKits, which ...
|
||||
return;
|
||||
|
||||
initializing = true;
|
||||
|
||||
QList<Kit *> kitsToRegister;
|
||||
QList<Kit *> kitsToValidate;
|
||||
QList<Kit *> kitsToCheck;
|
||||
@@ -203,6 +210,7 @@ void KitManager::restoreKits()
|
||||
setDefaultKit(k);
|
||||
|
||||
d->m_writer = new Utils::PersistentSettingsWriter(settingsFileName(), QLatin1String("QtCreatorProfiles"));
|
||||
d->m_initialized = true;
|
||||
emit kitsChanged();
|
||||
}
|
||||
|
||||
@@ -320,10 +328,8 @@ KitManager::KitList KitManager::restoreKits(const Utils::FileName &fileName)
|
||||
|
||||
QList<Kit *> KitManager::kits(const KitMatcher *m) const
|
||||
{
|
||||
if (!d->m_initialized) {
|
||||
d->m_initialized = true;
|
||||
if (!d->m_initialized)
|
||||
const_cast<KitManager *>(this)->restoreKits();
|
||||
}
|
||||
|
||||
QList<Kit *> result;
|
||||
foreach (Kit *k, d->m_kitList) {
|
||||
@@ -351,12 +357,10 @@ Kit *KitManager::find(const KitMatcher *m) const
|
||||
return matched.isEmpty() ? 0 : matched.first();
|
||||
}
|
||||
|
||||
Kit *KitManager::defaultKit()
|
||||
Kit *KitManager::defaultKit() const
|
||||
{
|
||||
if (!d->m_initialized) {
|
||||
d->m_initialized = true;
|
||||
restoreKits();
|
||||
}
|
||||
if (!d->m_initialized)
|
||||
const_cast<KitManager *>(this)->restoreKits();
|
||||
return d->m_defaultKit;
|
||||
}
|
||||
|
||||
@@ -378,7 +382,7 @@ void KitManager::notifyAboutUpdate(ProjectExplorer::Kit *k)
|
||||
{
|
||||
if (!k)
|
||||
return;
|
||||
if (kits().contains(k))
|
||||
if (kits().contains(k) && d->m_initialized)
|
||||
emit kitUpdated(k);
|
||||
else
|
||||
emit unmanagedKitUpdated(k);
|
||||
@@ -395,6 +399,7 @@ bool KitManager::registerKit(ProjectExplorer::Kit *k)
|
||||
|
||||
// make sure we have all the information in our kits:
|
||||
addKit(k);
|
||||
if (d->m_initialized)
|
||||
emit kitAdded(k);
|
||||
return true;
|
||||
}
|
||||
@@ -415,6 +420,7 @@ void KitManager::deregisterKit(Kit *k)
|
||||
}
|
||||
setDefaultKit(newDefault);
|
||||
}
|
||||
if (d->m_initialized)
|
||||
emit kitRemoved(k);
|
||||
delete k;
|
||||
}
|
||||
@@ -426,6 +432,7 @@ void KitManager::setDefaultKit(Kit *k)
|
||||
if (k && !kits().contains(k))
|
||||
return;
|
||||
d->m_defaultKit = k;
|
||||
if (d->m_initialized)
|
||||
emit defaultkitChanged();
|
||||
}
|
||||
|
||||
@@ -440,6 +447,7 @@ void KitManager::addKit(Kit *k)
|
||||
if (!k)
|
||||
return;
|
||||
|
||||
{
|
||||
KitGuard g(k);
|
||||
foreach (KitInformation *ki, d->m_informationList) {
|
||||
if (!k->hasValue(ki->dataId()))
|
||||
@@ -447,6 +455,7 @@ void KitManager::addKit(Kit *k)
|
||||
else
|
||||
ki->fix(k);
|
||||
}
|
||||
}
|
||||
|
||||
d->m_kitList.append(k);
|
||||
if (!d->m_defaultKit ||
|
||||
|
@@ -112,7 +112,7 @@ public:
|
||||
QList<Kit *> kits(const KitMatcher *m = 0) const;
|
||||
Kit *find(const Core::Id &id) const;
|
||||
Kit *find(const KitMatcher *m) const;
|
||||
Kit *defaultKit();
|
||||
Kit *defaultKit() const;
|
||||
|
||||
QList<KitInformation *> kitInformation() const;
|
||||
|
||||
|
@@ -439,6 +439,19 @@ QString MsvcToolChainFactory::id() const
|
||||
return QLatin1String(Constants::MSVC_TOOLCHAIN_ID);
|
||||
}
|
||||
|
||||
bool MsvcToolChainFactory::checkForVisualStudioInstallation(const QString &vsName)
|
||||
{
|
||||
const QSettings vsRegistry(
|
||||
#ifdef Q_OS_WIN64
|
||||
QLatin1String("HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VS7"),
|
||||
#else
|
||||
QLatin1String("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7"),
|
||||
#endif
|
||||
QSettings::NativeFormat);
|
||||
|
||||
return vsRegistry.contains(vsName);
|
||||
}
|
||||
|
||||
QList<ToolChain *> MsvcToolChainFactory::autoDetect()
|
||||
{
|
||||
QList<ToolChain *> results;
|
||||
@@ -500,6 +513,8 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect()
|
||||
const int dotPos = vsName.indexOf(QLatin1Char('.'));
|
||||
if (dotPos == -1)
|
||||
continue;
|
||||
if (!checkForVisualStudioInstallation(vsName))
|
||||
continue;
|
||||
|
||||
const QString path = vsRegistry.value(vsName).toString();
|
||||
const int version = vsName.left(dotPos).toInt();
|
||||
|
@@ -106,6 +106,8 @@ public:
|
||||
{ return MsvcToolChain::readFromMap(data); }
|
||||
|
||||
ToolChainConfigWidget *configurationWidget(ToolChain *);
|
||||
private:
|
||||
static bool checkForVisualStudioInstallation(const QString &vsName);
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
@@ -573,6 +573,8 @@ bool ToolChainOptionsPage::matches(const QString &s) const
|
||||
|
||||
void ToolChainOptionsPage::toolChainSelectionChanged()
|
||||
{
|
||||
if (!m_container)
|
||||
return;
|
||||
QModelIndex current = currentIndex();
|
||||
(void)m_container->takeWidget(); // Prevent deletion.
|
||||
QWidget *currentTcWidget = current.isValid() ? m_model->widget(current) : 0;
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include "qmakekitconfigwidget.h"
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
@@ -83,6 +84,30 @@ QList<ProjectExplorer::Task> QmakeKitInformation::validate(const ProjectExplorer
|
||||
return result;
|
||||
}
|
||||
|
||||
void QmakeKitInformation::fix(ProjectExplorer::Kit *k)
|
||||
{
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
|
||||
if (!version)
|
||||
return;
|
||||
|
||||
Utils::FileName spec = QmakeKitInformation::mkspec(k);
|
||||
if (spec.isEmpty())
|
||||
spec = version->mkspec();
|
||||
|
||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
|
||||
|
||||
if (!tc || !tc->suggestedMkspecList().contains(spec)) {
|
||||
QList<ProjectExplorer::ToolChain *> tcList = ProjectExplorer::ToolChainManager::instance()->toolChains();
|
||||
foreach (ProjectExplorer::ToolChain *current, tcList) {
|
||||
if (version->qtAbis().contains(current->targetAbi())
|
||||
&& current->suggestedMkspecList().contains(spec)) {
|
||||
ProjectExplorer::ToolChainKitInformation::setToolChain(k, current);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ProjectExplorer::KitConfigWidget *
|
||||
QmakeKitInformation::createConfigWidget(ProjectExplorer::Kit *k) const
|
||||
{
|
||||
|
@@ -50,6 +50,7 @@ public:
|
||||
QVariant defaultValue(ProjectExplorer::Kit *k) const;
|
||||
|
||||
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const;
|
||||
void fix(ProjectExplorer::Kit *k);
|
||||
|
||||
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const;
|
||||
|
||||
|
@@ -2023,6 +2023,7 @@ QStringList Qt4ProFileNode::includePaths(QtSupport::ProFileReader *reader) const
|
||||
}
|
||||
|
||||
paths.append(reader->absolutePathValues(QLatin1String("INCLUDEPATH"), m_projectDir));
|
||||
paths.append(reader->absolutePathValues(QLatin1String("QMAKE_INCDIR"), m_projectDir));
|
||||
// paths already contains moc dir and ui dir, due to corrrectly parsing uic.prf and moc.prf
|
||||
// except if those directories don't exist at the time of parsing
|
||||
// thus we add those directories manually (without checking for existence)
|
||||
|
@@ -285,22 +285,27 @@ bool BasicProposalItemListModel::keepPerfectMatch(AssistReason reason) const
|
||||
|
||||
QString BasicProposalItemListModel::proposalPrefix() const
|
||||
{
|
||||
if (m_currentItems.size() >= kMaxPrefixFilter)
|
||||
if (m_currentItems.size() >= kMaxPrefixFilter || m_currentItems.isEmpty())
|
||||
return QString();
|
||||
|
||||
// Compute common prefix
|
||||
QString firstKey = m_currentItems.first()->text();
|
||||
QString lastKey = m_currentItems.last()->text();
|
||||
const int length = qMin(firstKey.length(), lastKey.length());
|
||||
firstKey.truncate(length);
|
||||
lastKey.truncate(length);
|
||||
QString commonPrefix = m_currentItems.first()->text();
|
||||
for (int i = 1, ei = m_currentItems.size(); i < ei; ++i) {
|
||||
QString nextItem = m_currentItems.at(i)->text();
|
||||
const int length = qMin(commonPrefix.length(), nextItem.length());
|
||||
commonPrefix.truncate(length);
|
||||
nextItem.truncate(length);
|
||||
|
||||
while (firstKey != lastKey) {
|
||||
firstKey.chop(1);
|
||||
lastKey.chop(1);
|
||||
while (commonPrefix != nextItem) {
|
||||
commonPrefix.chop(1);
|
||||
nextItem.chop(1);
|
||||
}
|
||||
|
||||
return firstKey;
|
||||
if (commonPrefix.isEmpty()) // there is no common prefix, so return.
|
||||
return commonPrefix;
|
||||
}
|
||||
|
||||
return commonPrefix;
|
||||
}
|
||||
|
||||
IAssistProposalItem *BasicProposalItemListModel::proposalItem(int index) const
|
||||
|
@@ -40,6 +40,7 @@ def main():
|
||||
installLazySignalHandler(":QWebPage","loadFinished(bool)", "webPageContentLoaded")
|
||||
installLazySignalHandler(":*Qt Creator_Help::Internal::HelpViewer", "loadFinished(bool)",
|
||||
"webPageContentLoaded")
|
||||
addHelpDocumentationFromSDK()
|
||||
setAlwaysStartFullHelp()
|
||||
if not test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False,
|
||||
"text='Getting Started'")),
|
||||
|
@@ -82,6 +82,8 @@ def testSaveChangesAndMakeWritable(modifiedFiles, readOnlyFiles):
|
||||
clickButton(waitForObject("{text='Make Writable' type='QPushButton' unnamed='1' "
|
||||
"visible='1' window=%s}" % readOnlyMBoxStr))
|
||||
try:
|
||||
# avoid an AUT crash that happens frequently on the testing machines
|
||||
if currentApplicationContext().isRunning:
|
||||
waitForObject(cannotResetStr, 3000)
|
||||
# should not be possible
|
||||
test.fail("Could not reset file '%s' to writable state." % currentFile)
|
||||
|
Reference in New Issue
Block a user