Merge remote-tracking branch 'origin/2.7'

Conflicts:
	src/plugins/debugger/gdb/gdbengine.cpp

Change-Id: Ic8590ad97d7349ed7601a49c4fd873ffc9a5f9b5
This commit is contained in:
Eike Ziller
2013-03-12 10:56:52 +01:00
38 changed files with 8881 additions and 1416 deletions

View File

@@ -123,20 +123,7 @@ HTML.footer = \
" of their respective owners. <a title=\"Privacy Policy\"\n" \
" href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \
" </div>\n" \
"\n" \
" <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n" \
" <script type=\"text/javascript\">\n" \
" var _gaq = _gaq || [];\n" \
" _gaq.push(['_setAccount', 'UA-4457116-5']);\n" \
" _gaq.push(['_trackPageview']);\n" \
" (function() {\n" \
" var ga = document.createElement('script'); " \
"ga.type = 'text/javascript'; ga.async = true;\n" \
" ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + " \
"'.google-analytics.com/ga.js';\n" \
" var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n" \
" })();\n" \
" </script>\n"
"\n"
# Files not referenced in any qdoc file.

View File

@@ -49,6 +49,17 @@
When you run the application, \QC copies the necessary files to the device
and starts the application on it.
For example, adding
\code
target.path = /root
INSTALLS += target
\endcode
to the project .pro file will copy the binary of your project to \c /root
on the remote device. Additional files can be deployed by adding them to
further targets and adding those to \c INSTALLS as well.
\section1 Deploying on Embedded Linux
\image qtcreator-embedded-linux-deployment.png "Deploy to embedded Linux"
@@ -74,6 +85,11 @@
The \gui {Deploy tarball via SFTP upload} step specifies that \QC
uploads the tarball to the device and extracts it.
\note If the SFTP upload fails, make sure that the remote device has
SFTP enabled in its SSH daemon. Some versions of Dropbear that come
without SFTP support will crash when an SFTP upload is being attempted.
This is not a bug in \QC.
\section1 Deploying on MeeGo Harmattan and Maemo 5
You can use desktop files to display icons on the home screen of the

View File

@@ -1,5 +1,5 @@
import qbs.base 1.0
import qbs.fileinfo 1.0 as FileInfo
import qbs.fileinfo as FileInfo
Module {
Depends { id: qtcore; name: "Qt.core" }

View File

@@ -13,6 +13,7 @@ CONFIG += ordered
SUBDIRS = src share lib/qtcreator/qtcomponents
unix:!macx:!isEmpty(copydata):SUBDIRS += bin
!isEmpty(BUILD_TESTS):SUBDIRS += tests
OTHER_FILES += dist/copyright_template.txt \
$$files(dist/changes-*) \

View File

@@ -1,5 +1,5 @@
import qbs.base 1.0
import qbs.fileinfo 1.0 as FileInfo
import qbs.fileinfo as FileInfo
import "qbs/defaults.js" as Defaults
Project {

View File

@@ -6,7 +6,7 @@ if [[ $# != 2 ]]; then
usage:
$0 <refspec> <version>
Creates tar and zip source package from <refspec> and documentation-zip from current checkout.
Creates tar and zip source package from <refspec>.
Files and directories are named after <version>.
example:
$0 origin/2.2 2.2.0
@@ -17,14 +17,26 @@ fi
BRANCH=$1
VERSION=$2
cd `dirname $0`/..
RESULTDIR=`pwd`
echo "Creating tar archive..."
git archive --format=tar --prefix=qt-creator-${VERSION}-src/ ${BRANCH} | gzip > qt-creator-${VERSION}-src.tar.gz || exit 1
echo "Creating zip archive..."
git archive --format=zip --prefix=qt-creator-${VERSION}-src/ ${BRANCH} > qt-creator-${VERSION}-src.zip || exit 1
#echo "Creating documentation..."
#rm -r doc/html
#qmake -r && make docs_online || exit 1
#cd doc
#cp -r html qt-creator-${VERSION}
#zip -r ../qt-creator-${VERSION}-doc.zip qt-creator-${VERSION}
#rm -r qt-creator-${VERSION}
# untargz the sources for the revision into temporary dir
TEMPSOURCES=`mktemp -d -t qtcCreatorSourcePackage.XXXXXX`
tar xzf qt-creator-${VERSION}-src.tar.gz -C "$TEMPSOURCES" || exit 1
cd $TEMPSOURCES || exit 1
# write filter for text files (for use with 'file' command)
echo ".*:.*ASCII
.*:.*directory
.*:.*empty
.*:.*POSIX
.*:.*html
.*:.*text" > __txtpattern || exit 1
# list all files
find qt-creator-${VERSION}-src > __packagedfiles || exit 1
# record file types
file -f __packagedfiles > __filetypes || exit 1
# zip text files and binary files separately
cat __filetypes | grep -f __txtpattern -v | cut -d: -f1 | zip -9q "$RESULTDIR"/qt-creator-${VERSION}-src.zip -@ || exit 1
cat __filetypes | grep -f __txtpattern | cut -d: -f1 | zip -l9q "$RESULTDIR"/qt-creator-${VERSION}-src.zip -@ || exit 1

View File

@@ -4,10 +4,5 @@
id="QB.QML Application for Qt Quick 1.1">
<displayname>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.
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.
Requires &lt;b&gt;Qt 4.8&lt;/b&gt; or newer.
</description>
<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>
</template>

View File

@@ -4,10 +4,5 @@
id="QB.QML Application for Qt Quick 2.0">
<displayname>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.
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.
Requires &lt;b&gt;Qt 5.0&lt;/b&gt; or newer.
</description>
<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>
</template>

View File

@@ -0,0 +1,6 @@
let $prefix := string("QT_TRANSLATE_NOOP(&quot;QmlProjectManager::QmlApplicationWizardDialog&quot;, &quot;")
let $suffix := concat("&quot;)", codepoints-to-string(10))
for $file in tokenize($files, string("\|"))
let $doc := doc($file)
for $text in ($doc/*:template/*:description, $doc/*:wizard/*:displayname)
return fn:concat($prefix, data($text), $suffix)

View File

@@ -351,6 +351,10 @@
<source>Executable:</source>
<translation>Ausführbare Datei:</translation>
</message>
<message>
<source>Prefer Ninja generator (CMake 2.8.9 or higher required)</source>
<translation>Ninja-Generator bevorzugen (benötigt CMake 2.8.9 oder höher)</translation>
</message>
</context>
<context>
<name>CMakeProjectManager::Internal::InSourceBuildPage</name>
@@ -1203,10 +1207,6 @@
<source>&lt;System Language&gt;</source>
<translation>&lt;Sprache des Betriebssystems&gt;</translation>
</message>
<message>
<source>Done</source>
<translation>Beendet</translation>
</message>
<message>
<source>Restart required</source>
<translation>Neustart erforderlich</translation>
@@ -1301,12 +1301,12 @@
</message>
<message>
<source>Reset warnings</source>
<comment>Button text</comment>
<translation>Warnungen zurücksetzen</translation>
</message>
<message>
<source>Reset warnings</source>
<comment>Button text</comment>
<translation>Warnungen zurücksetzen</translation>
<source>Re-enable all warnings which were suppressed using &quot;Don&apos;t show again&quot; button (e.g. missing highlighter).</source>
<translation>Alle Warnungen wieder aktivieren, die durch eine &quot;Nicht noch einmal anzeigen&quot;-Schaltfläche unterdrückt wurden (z.B. fehlende Syntaxhervorhebung).</translation>
</message>
</context>
<context>
@@ -16854,7 +16854,7 @@ Erfordert &lt;b&gt;Qt 5.0&lt;/b&gt; oder neuer.</translation>
Requires &lt;b&gt;Qt 5.0&lt;/b&gt; or newer.</source>
<translation>Erstellt eine Qt Quick-Anwendung aus bereits existierenden QML-Dateien. Alle im Ordner der Haupt-QML-Datei befindlichen Dateien und Ordner sind zum Deployment vorgesehen. Der Inhalt des Ordners kann vor dem Deployment beliebig geändert werden.
Erforder &lt;b&gt;Qt 5.0&lt;/b&gt; oder neuer.</translation>
Erfordert &lt;b&gt;Qt 5.0&lt;/b&gt; oder neuer.</translation>
</message>
<message>
<source>The Qt Quick Components for MeeGo Harmattan are a set of ready-made components that are designed with specific native appearance for the MeeGo Harmattan platform.
@@ -16870,7 +16870,7 @@ Erfordert &lt;b&gt;Qt 4.7.4&lt;/b&gt; oder neuer sowie die Installation der Komp
Requires &lt;b&gt;Qt 4.7.0&lt;/b&gt; or newer.</source>
<translation>Erstellt eine Qt Quick-Anwendung aus bereits existierenden QML-Dateien. Alle im Ordner der Haupt-QML-Datei befindlichen Dateien und Ordner sind zum Deployment vorgesehen. Der Inhalt des Ordners kann vor dem Deployment beliebig geändert werden.
Erforder &lt;b&gt;Qt 4.7.0&lt;/b&gt; oder neuer.</translation>
Erfordert &lt;b&gt;Qt 4.7.0&lt;/b&gt; oder neuer.</translation>
</message>
</context>
<context>
@@ -27867,10 +27867,6 @@ Sie müssen für die Plattform kompiliert vorliegen</translation>
<source>Use local Qt libraries</source>
<translation>Lokale Qt-Bibliotheken ausliefern</translation>
</message>
<message>
<source>Edit Rules File</source>
<translation>Regeldatei bearbeiten</translation>
</message>
<message>
<source>Install Ministro, system-wide Qt shared libraries installer</source>
<translation>Installiere Ministro (systemweiter Installer für Qt shared libraries)</translation>
@@ -28877,6 +28873,10 @@ Bitte installieren Sie zumindest ein SDK.</translation>
<source>Cannot create Android package: current build configuration is not Qt 4.</source>
<translation>Es konnte kein Android-Paket erstellt werden: Die gegenwärtige Build-Konfiguration ist keine Qt 4-Build-Konfiguration.</translation>
</message>
<message>
<source>Cannot create Android package: No ANDROID_TARGET_ARCH set in make spec.</source>
<translation>Kann Android-Paket nicht erzeugen: ANDROID_TARGET_ARCH in make spec nicht gesetzt.</translation>
</message>
<message>
<source>Cannot find ELF information</source>
<translation>Es konnte keine ELF-Information gefunden werden</translation>
@@ -33597,6 +33597,22 @@ Jetzt Commit durchführen?</translation>
<source>Select File to Add</source>
<translation>Hinzuzufügende Datei auswählen</translation>
</message>
<message>
<source>Select Debug Token</source>
<translation>Debug Token auswählen</translation>
</message>
<message>
<source>Debug token:</source>
<translation>Debug Token:</translation>
</message>
<message>
<source>Error Reading Debug Token</source>
<translation>Fehler beim Lesen des Debug Tokens</translation>
</message>
<message>
<source>There was a problem reading debug token</source>
<translation>Es trat ein Fehler beim Lesen des Debug Tokens auf</translation>
</message>
<message>
<source>Package version:</source>
<translation>Version des Pakets:</translation>
@@ -33605,6 +33621,10 @@ Jetzt Commit durchführen?</translation>
<source>Package build ID:</source>
<translation>Paket-Build-ID:</translation>
</message>
<message>
<source>Set from debug token...</source>
<translation>Anhand des Debug Tokens einstellen...</translation>
</message>
</context>
<context>
<name>QmlDesigner::DesignDocument</name>

File diff suppressed because it is too large Load Diff

View File

@@ -21,6 +21,7 @@ TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/qtcreator_,.ts)
MIME_TR_H = $$OUT_PWD/mime_tr.h
CUSTOMWIZARD_TR_H = $$OUT_PWD/customwizard_tr.h
QMLWIZARD_TR_H = $$OUT_PWD/qmlwizard_tr.h
EXTERNALTOOLS_TR_H = $$OUT_PWD/externaltools_tr.h
for(dir, $$list($$files($$IDE_SOURCE_TREE/src/plugins/*))):MIMETYPES_FILES += $$files($$dir/*.mimetypes.xml)
@@ -29,12 +30,16 @@ MIMETYPES_FILES = \"$$join(MIMETYPES_FILES, |)\"
for(dir, $$list($$files($$IDE_SOURCE_TREE/share/qtcreator/templates/wizards/*))):CUSTOMWIZARD_FILES += $$files($$dir/wizard.xml)
CUSTOMWIZARD_FILES = \"$$join(CUSTOMWIZARD_FILES, |)\"
for(dir, $$list($$files($$IDE_SOURCE_TREE/share/qtcreator/templates/qml/*))):QMLWIZARD_FILES += $$files($$dir/template.xml)
QMLWIZARD_FILES = \"$$join(QMLWIZARD_FILES, |)\"
for(file, $$list($$files($$IDE_SOURCE_TREE/src/share/qtcreator/externaltools/*))):EXTERNALTOOLS_FILES += $$files($$file)
EXTERNALTOOLS_FILES = \"$$join(EXTERNALTOOLS_FILES, |)\"
extract.commands += \
$$XMLPATTERNS -output $$MIME_TR_H -param files=$$MIMETYPES_FILES $$PWD/extract-mimetypes.xq $$escape_expand(\\n\\t) \
$$XMLPATTERNS -output $$CUSTOMWIZARD_TR_H -param files=$$CUSTOMWIZARD_FILES $$PWD/extract-customwizards.xq $$escape_expand(\\n\\t) \
$$XMLPATTERNS -output $$QMLWIZARD_TR_H -param files=$$QMLWIZARD_FILES $$PWD/extract-qmlwizards.xq $$escape_expand(\\n\\t) \
$$XMLPATTERNS -output $$EXTERNALTOOLS_TR_H -param files=$$EXTERNALTOOLS_FILES $$PWD/extract-externaltools.xq
QMAKE_EXTRA_TARGETS += extract
@@ -54,12 +59,12 @@ files = $$files($$PWD/*_??.ts) $$PWD/qtcreator_untranslated.ts
for(file, files) {
lang = $$replace(file, .*_([^/]*)\\.ts, \\1)
v = ts-$${lang}.commands
$$v = cd $$wd && $$LUPDATE $$sources $$MIME_TR_H $$CUSTOMWIZARD_TR_H $$EXTERNALTOOLS_TR_H -ts $$file
$$v = cd $$wd && $$LUPDATE $$sources $$MIME_TR_H $$CUSTOMWIZARD_TR_H $$QMLWIZARD_TR_H $$EXTERNALTOOLS_TR_H -ts $$file
v = ts-$${lang}.depends
$$v = extract
QMAKE_EXTRA_TARGETS += ts-$$lang
}
ts-all.commands = cd $$wd && $$LUPDATE $$sources $$MIME_TR_H $$CUSTOMWIZARD_TR_H $$EXTERNALTOOLS_TR_H -ts $$files
ts-all.commands = cd $$wd && $$LUPDATE $$sources $$MIME_TR_H $$CUSTOMWIZARD_TR_H $$QMLWIZARD_TR_H $$EXTERNALTOOLS_TR_H -ts $$files
ts-all.depends = extract
QMAKE_EXTRA_TARGETS += ts-all

View File

@@ -368,12 +368,8 @@ void Lexer::scan_helper(Token *tok)
if (_yychar == '/' || _yychar == '!') {
yyinp();
if (_yychar == '<' || _yychar != '/') {
yyinp();
doxy = true;
}
}
while (_yychar && _yychar != '\n')
yyinp();

View File

@@ -548,7 +548,7 @@ bool ResolveExpression::visit(SimpleNameAST *ast)
if (typeItems.empty())
continue;
CPlusPlus::Clone cloner(_context.control().data());
CPlusPlus::Clone cloner(_context.bindings()->control().data());
for (int n = 0; n < typeItems.size(); ++ n) {
FullySpecifiedType newType = cloner.type(typeItems[n].type(), 0);
@@ -1061,7 +1061,8 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas
FullySpecifiedType ResolveExpression::instantiate(const Name *className, Symbol *candidate) const
{
return DeprecatedGenTemplateInstance::instantiate(className, candidate, _context.control());
return DeprecatedGenTemplateInstance::instantiate(className, candidate,
_context.bindings()->control());
}
bool ResolveExpression::visit(PostIncrDecrAST *ast)

View File

@@ -1,5 +1,5 @@
import qbs.base 1.0
import qbs.fileinfo 1.0 as FileInfo
import qbs.fileinfo as FileInfo
import "../../qbs/defaults.js" as Defaults
Product {
@@ -46,4 +46,8 @@ Product {
qbs.install: true
qbs.installDir: "lib/qtcreator/plugins/" + provider
}
ProductModule {
Depends { name: "ExtensionSystem" }
}
}

View File

@@ -576,15 +576,15 @@ QString AndroidManager::loadLocalJarsInitClasses(ProjectExplorer::Target *target
return loadLocal(target, apiLevel, Jar, QLatin1String("initClass"));
}
QStringList AndroidManager::availableQtLibs(ProjectExplorer::Target *target)
QVector<AndroidManager::Library> AndroidManager::availableQtLibsWithDependencies(ProjectExplorer::Target *target)
{
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
if (!target->activeRunConfiguration())
return QStringList();
return QVector<AndroidManager::Library>();
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target->kit());
if (tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE))
return QStringList();
return QVector<AndroidManager::Library>();
Qt4ProjectManager::Qt4Project *project = static_cast<Qt4ProjectManager::Qt4Project *>(target->project());
QString arch = project->rootQt4ProjectNode()->singleVariableValue(Qt4ProjectManager::AndroidArchVar);
@@ -594,20 +594,13 @@ QStringList AndroidManager::availableQtLibs(ProjectExplorer::Target *target)
Utils::FileName readelfPath = AndroidConfigurations::instance().readelfPath(target->activeRunConfiguration()->abi().architecture(),
atc->ndkToolChainVersion());
QStringList libs;
const Qt4ProjectManager::Qt4Project *const qt4Project
= qobject_cast<const Qt4ProjectManager::Qt4Project *>(target->project());
if (!qt4Project || !version)
return libs;
return QVector<AndroidManager::Library>();
QString qtLibsPath = version->qmakeProperty("QT_INSTALL_LIBS");
if (!readelfPath.toFileInfo().exists()) {
QDirIterator libsIt(qtLibsPath, QStringList() << QLatin1String("libQt*.so"));
while (libsIt.hasNext()) {
libsIt.next();
libs << libsIt.fileName().mid(3, libsIt.fileName().indexOf(QLatin1Char('.')) - 3);
}
libs.sort();
return libs;
return QVector<AndroidManager::Library>();
}
LibrariesMap mapLibs;
QDir libPath;
@@ -652,9 +645,17 @@ QStringList AndroidManager::availableQtLibs(ProjectExplorer::Target *target)
qtLibraries.push_back(mapLibs[key]);
}
qSort(qtLibraries.begin(), qtLibraries.end(), qtLibrariesLessThan);
foreach (Library lib, qtLibraries) {
return qtLibraries;
}
QStringList AndroidManager::availableQtLibs(ProjectExplorer::Target *target)
{
QStringList libs;
QVector<Library> qtLibraries = availableQtLibsWithDependencies(target);
foreach (Library lib, qtLibraries)
libs.push_back(lib.name);
}
return libs;
}

View File

@@ -104,6 +104,18 @@ public:
static QString loadLocalJars(ProjectExplorer::Target *target, int apiLevel);
static QString loadLocalJarsInitClasses(ProjectExplorer::Target *target, int apiLevel);
class Library
{
public:
Library()
{ level = -1; }
int level;
QStringList dependencies;
QString name;
};
typedef QMap<QString, Library> LibrariesMap;
static QVector<AndroidManager::Library> availableQtLibsWithDependencies(ProjectExplorer::Target *target);
static QStringList availableQtLibs(ProjectExplorer::Target *target);
static QStringList qtLibs(ProjectExplorer::Target *target);
static bool setQtLibs(ProjectExplorer::Target *target, const QStringList &libs);
@@ -132,17 +144,6 @@ private:
};
static QString loadLocal(ProjectExplorer::Target *target, int apiLevel, ItemType item, const QString &attribute=QLatin1String("file"));
class Library
{
public:
Library()
{ level = -1; }
int level;
QStringList dependencies;
QString name;
};
typedef QMap<QString, Library> LibrariesMap;
enum IconType
{
HighDPI,

View File

@@ -213,6 +213,57 @@ static void parseSharedLibs(const QByteArray &buffer, QStringList *libs)
}
}
void markNeeded(const QString &library,
const QVector<AndroidManager::Library> &dependencies,
QMap<QString, bool> *neededMap)
{
if (!neededMap->contains(library))
return;
if (neededMap->value(library))
return;
neededMap->insert(library, true);
for (int i = 0; i < dependencies.size(); ++i) {
if (dependencies.at(i).name == library) {
foreach (const QString &dependency, dependencies.at(i).dependencies)
markNeeded(dependency, dependencies, neededMap);
break;
}
}
}
QStringList requiredLibraries(QVector<AndroidManager::Library> availableLibraries,
const QStringList &checkedLibs, const QStringList &dependencies)
{
QMap<QString, bool> neededLibraries;
QVector<AndroidManager::Library>::const_iterator it, end;
it = availableLibraries.constBegin();
end = availableLibraries.constEnd();
for (; it != end; ++it)
neededLibraries[(*it).name] = false;
// Checked items are always needed
foreach (const QString &lib, checkedLibs)
markNeeded(lib, availableLibraries, &neededLibraries);
foreach (const QString &lib, dependencies) {
if (lib.startsWith(QLatin1String("lib"))
&& lib.endsWith(QLatin1String(".so")))
markNeeded(lib.mid(3, lib.size() - 6), availableLibraries, &neededLibraries);
}
for (int i = availableLibraries.size() - 1; i>= 0; --i)
if (!neededLibraries.value(availableLibraries.at(i).name))
availableLibraries.remove(i);
QStringList requiredLibraries;
foreach (const AndroidManager::Library &lib, availableLibraries) {
if (neededLibraries.value(lib.name))
requiredLibraries << lib.name;
}
return requiredLibraries;
}
void AndroidPackageCreationStep::checkRequiredLibraries()
{
QProcess readelfProc;
@@ -235,21 +286,16 @@ void AndroidPackageCreationStep::checkRequiredLibraries()
}
QStringList libs;
parseSharedLibs(readelfProc.readAll(), &libs);
QStringList checkedLibs = AndroidManager::qtLibs(target());
QStringList requiredLibraries;
foreach (const QString &qtLib, AndroidManager::availableQtLibs(target())) {
if (libs.contains(QLatin1String("lib") + qtLib + QLatin1String(".so")) || checkedLibs.contains(qtLib))
requiredLibraries << qtLib;
}
AndroidManager::setQtLibs(target(), requiredLibraries);
AndroidManager::setQtLibs(target(), requiredLibraries(AndroidManager::availableQtLibsWithDependencies(target()),
AndroidManager::qtLibs(target()), libs));
checkedLibs = AndroidManager::prebundledLibs(target());
requiredLibraries.clear();
QStringList checkedLibs = AndroidManager::prebundledLibs(target());
QStringList prebundledLibraries;
foreach (const QString &qtLib, AndroidManager::availableQtLibs(target())) {
if (libs.contains(qtLib) || checkedLibs.contains(qtLib))
requiredLibraries << qtLib;
prebundledLibraries << qtLib;
}
AndroidManager::setPrebundledLibs(target(), requiredLibraries);
AndroidManager::setPrebundledLibs(target(), prebundledLibraries);
emit updateRequiredLibrariesModels();
}
@@ -264,7 +310,7 @@ void AndroidPackageCreationStep::initCheckRequiredLibrariesForRun()
m_readElf = AndroidConfigurations::instance().readelfPath(target()->activeRunConfiguration()->abi().architecture(),
atc->ndkToolChainVersion());
m_qtLibs = AndroidManager::qtLibs(target());
m_availableQtLibs = AndroidManager::availableQtLibs(target());
m_availableQtLibs = AndroidManager::availableQtLibsWithDependencies(target());
m_prebundledLibs = AndroidManager::prebundledLibs(target());
}
@@ -282,22 +328,18 @@ void AndroidPackageCreationStep::checkRequiredLibrariesForRun()
}
QStringList libs;
parseSharedLibs(readelfProc.readAll(), &libs);
QStringList requiredLibraries;
foreach (const QString &qtLib, m_availableQtLibs) {
if (libs.contains(QLatin1String("lib") + qtLib + QLatin1String(".so")) || m_qtLibs.contains(qtLib))
requiredLibraries << qtLib;
}
QMetaObject::invokeMethod(this, "setQtLibs",Qt::BlockingQueuedConnection,
Q_ARG(QStringList, requiredLibraries));
requiredLibraries.clear();
foreach (const QString &qtLib, m_availableQtLibs) {
if (libs.contains(qtLib) || m_prebundledLibs.contains(qtLib))
requiredLibraries << qtLib;
QMetaObject::invokeMethod(this, "setQtLibs",Qt::BlockingQueuedConnection,
Q_ARG(QStringList, requiredLibraries(m_availableQtLibs, m_qtLibs, libs)));
QStringList prebundledLibraries;
foreach (const AndroidManager::Library &qtLib, m_availableQtLibs) {
if (libs.contains(qtLib.name) || m_prebundledLibs.contains(qtLib.name))
prebundledLibraries << qtLib.name;
}
QMetaObject::invokeMethod(this, "setPrebundledLibs", Qt::BlockingQueuedConnection,
Q_ARG(QStringList, requiredLibraries));
Q_ARG(QStringList, prebundledLibraries));
emit updateRequiredLibrariesModels();
}

View File

@@ -31,6 +31,7 @@
#define ANDROIDPACKAGECREATIONSTEP_H
#include "javaparser.h"
#include "androidmanager.h"
#include <projectexplorer/abi.h>
#include <projectexplorer/buildstep.h>
@@ -125,7 +126,7 @@ private:
Utils::FileName m_appPath;
Utils::FileName m_readElf;
QStringList m_qtLibs;
QStringList m_availableQtLibs;
QVector<AndroidManager::Library> m_availableQtLibs;
QStringList m_prebundledLibs;
};

View File

@@ -68,7 +68,8 @@ QtSupport::BaseQtVersion *AndroidQtVersionFactory::create(const Utils::FileName
QFileInfo fi(qmakePath.toString());
if (!fi.exists() || !fi.isExecutable() || !fi.isFile())
return 0;
if (!evaluator->values(QLatin1String("CONFIG")).contains(QLatin1String("android")))
if (!evaluator->values(QLatin1String("CONFIG")).contains(QLatin1String("android"))
&& evaluator->value(QLatin1String("QMAKE_PLATFORM")) != QLatin1String("android"))
return 0;
return new AndroidQtVersion(qmakePath, isAutoDetected, autoDetectionSource);
}

View File

@@ -1493,7 +1493,7 @@ MimeType MimeDatabasePrivate::findByFile(const QFileInfo &f, unsigned *priorityP
// Pass 1) Try to match on suffix
const TypeMimeTypeMap::const_iterator cend = m_typeMimeTypeMap.constEnd();
for (int level = m_maxLevel; level >= 0 && candidate.isNull(); level--) {
for (int level = m_maxLevel; level >= 0; level--) {
for (TypeMimeTypeMap::const_iterator it = m_typeMimeTypeMap.constBegin(); it != cend; ++it) {
if (it.value().level == level) {
const unsigned suffixPriority = it.value().type.matchesFileBySuffix(context);

View File

@@ -340,13 +340,8 @@ DebuggerSettings::DebuggerSettings(QSettings *settings)
item = new SavedAction(this);
item->setText(tr("Break on \"abort\""));
item->setCheckable(true);
#ifdef Q_OS_WIN
item->setDefaultValue(true);
item->setValue(true);
#else
item->setDefaultValue(false);
item->setValue(false);
#endif
item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnAbort"));
insertItem(BreakOnAbort, item);

View File

@@ -2648,10 +2648,49 @@ void GdbEngine::handleCatchInsert(const GdbResponse &response)
}
}
void GdbEngine::handleBkpt(const GdbMi &bkpt, const BreakpointModelId &id)
{
BreakHandler *handler = breakHandler();
BreakpointResponse br = handler->response(id);
const QByteArray nr = bkpt.findChild("number").data();
const BreakpointResponseId rid(nr);
QTC_ASSERT(rid.isValid(), return);
if (nr.contains('.')) {
// A sub-breakpoint.
BreakpointResponse sub;
updateResponse(sub, bkpt);
sub.id = rid;
sub.type = br.type;
handler->insertSubBreakpoint(id, sub);
return;
}
// The MI output format might change, see
// http://permalink.gmane.org/gmane.comp.gdb.patches/83936
const GdbMi locations = bkpt.findChild("locations");
if (locations.isValid()) {
foreach (const GdbMi &loc, locations.children()) {
// A sub-breakpoint.
const QByteArray subnr = loc.findChild("number").data();
const BreakpointResponseId subrid(subnr);
BreakpointResponse sub;
updateResponse(sub, loc);
sub.id = subrid;
sub.type = br.type;
handler->insertSubBreakpoint(id, sub);
}
}
// A (the?) primary breakpoint.
updateResponse(br, bkpt);
br.id = rid;
handler->setResponse(id, br);
}
void GdbEngine::handleBreakInsert1(const GdbResponse &response)
{
BreakHandler *handler = breakHandler();
BreakpointModelId id = response.cookie.value<BreakpointModelId>();
const BreakpointModelId id = response.cookie.value<BreakpointModelId>();
if (handler->state(id) == BreakpointRemoveRequested) {
if (response.resultClass == GdbResultDone) {
// This delete was defered. Act now.
@@ -2671,35 +2710,18 @@ void GdbEngine::handleBreakInsert1(const GdbResponse &response)
// already known data from the BreakpointManager, and then
// iterate over all items to update main- and sub-data.
const GdbMi mainbkpt = response.data.findChild("bkpt");
QByteArray nr = mainbkpt.findChild("number").data();
BreakpointResponseId rid(nr);
if (!isHiddenBreakpoint(rid)) {
BreakpointResponse br = handler->response(id);
foreach (const GdbMi &bkpt, response.data.children()) {
nr = bkpt.findChild("number").data();
rid = BreakpointResponseId(nr);
QTC_ASSERT(rid.isValid(), continue);
if (nr.contains('.')) {
// A sub-breakpoint.
BreakpointResponse sub;
updateResponse(sub, bkpt);
sub.id = rid;
sub.type = br.type;
handler->insertSubBreakpoint(id, sub);
} else {
// A (the?) primary breakpoint.
updateResponse(br, bkpt);
br.id = rid;
handler->setResponse(id, br);
}
}
const QByteArray mainnr = mainbkpt.findChild("number").data();
const BreakpointResponseId mainrid(mainnr);
if (!isHiddenBreakpoint(mainrid)) {
foreach (const GdbMi &bkpt, response.data.children())
handleBkpt(bkpt, id);
if (handler->needsChange(id)) {
handler->notifyBreakpointChangeAfterInsertNeeded(id);
changeBreakpoint(id);
} else {
handler->notifyBreakpointInsertOk(id);
}
br = handler->response(id);
BreakpointResponse br = handler->response(id);
attemptAdjustBreakpointLocation(id);
// Remove if we only support 7.4 or later.
if (br.multiple && !m_hasBreakpointNotifications)

View File

@@ -463,6 +463,7 @@ private: ////////// View & Data Stuff //////////
void handleBreakLineNumber(const GdbResponse &response);
void handleWatchInsert(const GdbResponse &response);
void handleCatchInsert(const GdbResponse &response);
void handleBkpt(const GdbMi &bkpt, const BreakpointModelId &id);
void handleInfoLine(const GdbResponse &response);
void extractDataFromInfoBreak(const QString &output, BreakpointModelId);
void updateResponse(BreakpointResponse &response, const GdbMi &bkpt);

View File

@@ -361,7 +361,7 @@ void RunSettingsWidget::currentRunConfigurationChanged(int index)
if (index >= 0)
selectedRunConfiguration = m_runConfigurationsModel->runConfigurationAt(index);
if (selectedRunConfiguration != m_runConfiguration)
if (selectedRunConfiguration == m_runConfiguration)
return;
m_ignoreChange = true;

View File

@@ -37,6 +37,7 @@ static const char ERR_WRONG_CSK_PASS[] = "The signature on the code signing requ
static const char ERR_WRONG_KEYSTORE_PASS[] = "Failed to decrypt keystore, invalid password";
static const char ERR_ILLEGAL_DEVICE_PIN[] = "Illegal device PIN";
static const char ERR_NETWORK_UNREACHABLE[] = "Network is unreachable";
static const char ERR_NOT_YET_REGISTGERED[] = "Not yet registered to request debug tokens";
}
namespace Qnx {
@@ -49,6 +50,7 @@ BlackBerryDebugTokenRequester::BlackBerryDebugTokenRequester(QObject *parent) :
addErrorStringMapping(QLatin1String(ERR_WRONG_KEYSTORE_PASS), WrongKeystorePassword);
addErrorStringMapping(QLatin1String(ERR_WRONG_KEYSTORE_PASS), WrongKeystorePassword);
addErrorStringMapping(QLatin1String(ERR_NETWORK_UNREACHABLE), NetworkUnreachable);
addErrorStringMapping(QLatin1String(ERR_NOT_YET_REGISTGERED), BlackBerryNdkProcess::UnknownError);
}
void BlackBerryDebugTokenRequester::requestDebugToken(const QString &path,

View File

@@ -58,6 +58,7 @@ BlackBerryDeviceConfigurationWidget::BlackBerryDeviceConfigurationWidget(const I
connect(ui->showPasswordCheckBox, SIGNAL(toggled(bool)), this, SLOT(showPassword(bool)));
connect(ui->debugToken, SIGNAL(changed(QString)), this, SLOT(updateUploadButton()));
connect(ui->debugToken, SIGNAL(editingFinished()), this, SLOT(debugTokenEditingFinished()));
connect(ui->debugToken, SIGNAL(browsingFinished()), this, SLOT(debugTokenEditingFinished()));
connect(ui->requestButton, SIGNAL(clicked()), this, SLOT(requestDebugToken()));
connect(ui->uploadButton, SIGNAL(clicked()), this, SLOT(uploadDebugToken()));
connect(uploader, SIGNAL(finished(int)), this, SLOT(uploadFinished(int)));

View File

@@ -9,7 +9,7 @@
<alias type="text/xml"/>
<sub-class-of type="text/plain"/>
<comment>XML document</comment>
<glob pattern="*.xml"/>
<glob pattern="*.xml" weight="50"/><!-- reduce weight to allow application/vnd.rim.qnx.bar_descriptor to override by content -->
<glob pattern="*.xsl"/>
<glob pattern="*.xslt"/>
<glob pattern="*.xbl"/>

View File

@@ -176,6 +176,8 @@ private slots:
void test_checksymbols_StaticUse();
void test_checksymbols_VariableHasTheSameNameAsEnumUse();
void test_checksymbols_NestedClassOfEnclosingTemplateUse();
void test_checksymbols_QTCREATORBUG8890_danglingPointer();
};
void tst_CheckSymbols::test_checksymbols_TypeUse()
@@ -442,5 +444,56 @@ void tst_CheckSymbols::test_checksymbols_NestedClassOfEnclosingTemplateUse()
TestData::check(source, expectedUses);
}
void tst_CheckSymbols::test_checksymbols_QTCREATORBUG8890_danglingPointer()
{
const QByteArray source =
"template<class T> class QList {\n"
" public:\n"
" T operator[](int);\n"
"};\n"
"\n"
"template<class T> class QPointer {\n"
" public:\n"
" T& operator->();\n"
"};\n"
"\n"
"class Foo {\n"
" void foo() {}\n"
"};\n"
"\n"
"void f()\n"
"{\n"
" QList<QPointer<Foo> > list;\n"
" list[0]->foo();\n"
" list[0]->foo(); // Crashed because of this 'extra' line.\n"
"}\n"
;
const QList<Use> expectedUses = QList<Use>()
<< Use(1, 16, 1, SemanticInfo::TypeUse)
<< Use(1, 25, 5, SemanticInfo::TypeUse)
<< Use(3, 9, 1, SemanticInfo::TypeUse)
<< Use(3, 11, 8, SemanticInfo::FunctionUse)
<< Use(6, 16, 1, SemanticInfo::TypeUse)
<< Use(6, 25, 8, SemanticInfo::TypeUse)
<< Use(8, 9, 1, SemanticInfo::TypeUse)
<< Use(8, 12, 8, SemanticInfo::FunctionUse)
<< Use(11, 7, 3, SemanticInfo::TypeUse)
<< Use(12, 10, 3, SemanticInfo::FunctionUse)
<< Use(15, 6, 1, SemanticInfo::FunctionUse)
<< Use(17, 5, 5, SemanticInfo::TypeUse)
<< Use(17, 11, 8, SemanticInfo::TypeUse)
<< Use(17, 20, 3, SemanticInfo::TypeUse)
<< Use(17, 27, 4, SemanticInfo::LocalUse)
<< Use(18, 5, 4, SemanticInfo::LocalUse)
<< Use(18, 14, 3, SemanticInfo::FunctionUse)
<< Use(19, 5, 4, SemanticInfo::LocalUse)
<< Use(19, 14, 3, SemanticInfo::FunctionUse)
;
TestData::check(source, expectedUses);
}
QTEST_APPLESS_MAIN(tst_CheckSymbols)
#include "tst_checksymbols.moc"

View File

@@ -65,7 +65,7 @@ void tst_SimpleLexer::doxygen_comments()
Token expectedToken; // Create a Token in order to spell the token kind
expectedToken.f.kind = expectedTokenKind;
// qDebug("Comparing (i=%d): \"%s\" \"%s\"", i, token.spell(), expectedToken.spell());
QCOMPARE(token.spell(), expectedToken.spell());
QCOMPARE(token.kind(), expectedTokenKind);
}
QVERIFY2(i == expectedTokenKindList.size(), "Less tokens than expected.");
}
@@ -83,7 +83,7 @@ void tst_SimpleLexer::doxygen_comments_data()
QTest::newRow(source) << source << expectedTokenKindList;
source = "//// comment";
expectedTokenKindList = QList<unsigned>() << T_CPP_COMMENT;
expectedTokenKindList = QList<unsigned>() << T_CPP_DOXY_COMMENT;
QTest::newRow(source) << source << expectedTokenKindList;
source = "/// comment";
@@ -105,6 +105,66 @@ void tst_SimpleLexer::doxygen_comments_data()
source = "///\n";
expectedTokenKindList = QList<unsigned>() << T_CPP_DOXY_COMMENT;
QTest::newRow(source) << source << expectedTokenKindList;
source = "///\n"
"int i;";
expectedTokenKindList = QList<unsigned>()
<< T_CPP_DOXY_COMMENT
<< T_INT << T_IDENTIFIER << T_SEMICOLON;
QTest::newRow(source) << source << expectedTokenKindList;
source = "/* comment */\n";
expectedTokenKindList = QList<unsigned>() << T_COMMENT;
QTest::newRow(source) << source << expectedTokenKindList;
source = "/* comment\n"
" comment\n"
" */\n";
expectedTokenKindList = QList<unsigned>() << T_COMMENT;
QTest::newRow(source) << source << expectedTokenKindList;
source = "/** comment */";
expectedTokenKindList = QList<unsigned>() << T_DOXY_COMMENT;
QTest::newRow(source) << source << expectedTokenKindList;
source = "/** comment */\n";
expectedTokenKindList = QList<unsigned>() << T_DOXY_COMMENT;
QTest::newRow(source) << source << expectedTokenKindList;
source = "/** comment */ int i;\n";
expectedTokenKindList = QList<unsigned>()
<< T_DOXY_COMMENT << T_INT << T_IDENTIFIER << T_SEMICOLON;
QTest::newRow(source) << source << expectedTokenKindList;
source = "/**\n"
" * comment\n"
" */\n";
expectedTokenKindList = QList<unsigned>() << T_DOXY_COMMENT;
QTest::newRow(source) << source << expectedTokenKindList;
source = "/*!\n"
" * comment\n"
" */\n";
expectedTokenKindList = QList<unsigned>() << T_DOXY_COMMENT;
QTest::newRow(source) << source << expectedTokenKindList;
source = "/*!\n"
" comment\n"
"*/\n";
expectedTokenKindList = QList<unsigned>() << T_DOXY_COMMENT;
QTest::newRow(source) << source << expectedTokenKindList;
source = "int i; /*!< first counter */\n"
"int j; /**< second counter */\n"
"int k; ///< third counter\n"
"int l; //!< fourth counter\n"
" //!< more details... ";
expectedTokenKindList = QList<unsigned>()
<< T_INT << T_IDENTIFIER << T_SEMICOLON << T_DOXY_COMMENT
<< T_INT << T_IDENTIFIER << T_SEMICOLON << T_DOXY_COMMENT
<< T_INT << T_IDENTIFIER << T_SEMICOLON << T_CPP_DOXY_COMMENT
<< T_INT << T_IDENTIFIER << T_SEMICOLON << T_CPP_DOXY_COMMENT << T_CPP_DOXY_COMMENT;
QTest::newRow(source) << source << expectedTokenKindList;
}
QTEST_APPLESS_MAIN(tst_SimpleLexer)

View File

@@ -450,7 +450,7 @@ void tst_ProFileWriter::adds()
QString var = QLatin1String("SOURCES");
QMakeParser parser(0, &parseHandler);
ProFile *proFile = parser.parsedProBlock(QLatin1String(BASE_DIR "/test.pro"), input);
ProFile *proFile = parser.parsedProBlock(input, QLatin1String(BASE_DIR "/test.pro"), 1);
QVERIFY(proFile);
PW::putVarValues(proFile, &lines, values, var, PW::PutFlags(flags), scope);
proFile->deref();
@@ -620,7 +620,7 @@ void tst_ProFileWriter::removes()
QStringList vars; vars << QLatin1String("SOURCES");
QMakeParser parser(0, &parseHandler);
ProFile *proFile = parser.parsedProBlock(QLatin1String(BASE_DIR "/test.pro"), input);
ProFile *proFile = parser.parsedProBlock(input, QLatin1String(BASE_DIR "/test.pro"), 1);
QVERIFY(proFile);
Qt4ProjectManager::Internal::ProWriter::removeVarValues(proFile, &lines, values, vars);
proFile->deref();
@@ -648,7 +648,7 @@ void tst_ProFileWriter::multiVar()
QStringList vars; vars << QLatin1String("SOURCES") << QLatin1String("HEADERS");
QMakeParser parser(0, &parseHandler);
ProFile *proFile = parser.parsedProBlock(QLatin1String(BASE_DIR "/test.pro"), input);
ProFile *proFile = parser.parsedProBlock(input, QLatin1String(BASE_DIR "/test.pro"), 1);
QVERIFY(proFile);
Qt4ProjectManager::Internal::ProWriter::removeFiles(proFile, &lines, baseDir, files, vars);
proFile->deref();
@@ -668,7 +668,7 @@ void tst_ProFileWriter::addFiles()
);
QMakeParser parser(0, &parseHandler);
ProFile *proFile = parser.parsedProBlock(QLatin1String(BASE_DIR "/test.pro"), input);
ProFile *proFile = parser.parsedProBlock(input, QLatin1String(BASE_DIR "/test.pro"), 1);
QVERIFY(proFile);
Qt4ProjectManager::Internal::ProWriter::addFiles(proFile, &lines, QDir(BASE_DIR),
QStringList() << QString::fromLatin1(BASE_DIR "/sub/bar.cpp"),
@@ -689,7 +689,7 @@ void tst_ProFileWriter::removeFiles()
);
QMakeParser parser(0, &parseHandler);
ProFile *proFile = parser.parsedProBlock(QLatin1String(BASE_DIR "/test.pro"), input);
ProFile *proFile = parser.parsedProBlock(input, QLatin1String(BASE_DIR "/test.pro"), 1);
QVERIFY(proFile);
Qt4ProjectManager::Internal::ProWriter::removeFiles(proFile, &lines, QDir(BASE_DIR),
QStringList() << QString::fromLatin1(BASE_DIR "/sub/bar.cpp"),

View File

@@ -36,6 +36,7 @@
:DebugModeWidget.Debugger Log_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger.Docks.Output' type='QDockWidget' visible='1' windowTitle='Debugger Log'}
:DebugModeWidget.Debugger Toolbar_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger Toolbar' type='QDockWidget' visible='1' windowTitle='Debugger Toolbar'}
:DebugModeWidget.OK_QPushButton {container=':Qt Creator.DebugModeWidget_QSplitter' text='OK' type='QPushButton' unnamed='1' visible='1'}
:DebugModeWidget_QComboBox {container=':Qt Creator.DebugModeWidget_QSplitter' occurrence='2' type='QComboBox' unnamed='1' visible='1'}
:Debugger Toolbar.Continue_QToolButton {container=':DebugModeWidget.Debugger Toolbar_QDockWidget' text='Continue' type='QToolButton' unnamed='1' visible='1'}
:Debugger Toolbar.Exit Debugger_QToolButton {container=':DebugModeWidget.Debugger Toolbar_QDockWidget' text='Stop Debugger' type='QToolButton' unnamed='1' visible='1'}
:Debugger Toolbar.StatusText_Utils::StatusLabel {container=':DebugModeWidget.Debugger Toolbar_QDockWidget' type='Utils::StatusLabel' unnamed='1'}

View File

@@ -206,22 +206,16 @@ def verifyBreakPoint(bpToVerify):
if isinstance(bpToVerify, dict):
fileName = bpToVerify.keys()[0]
editor = getEditorForFileSuffix(fileName)
if editor == None:
return False
if editor:
test.compare(waitForObject(":DebugModeWidget_QComboBox").toolTip, fileName,
"Verify that the right file is opened")
textPos = editor.textCursor().position()
line = str(editor.plainText)[:textPos].count("\n") + 1
windowTitle = str(waitForObject(":Qt Creator_Core::Internal::MainWindow").windowTitle)
if fileName in windowTitle:
test.passes("Creator's window title changed according to current file")
else:
test.fail("Creator's window title did not change according to current file")
if line == bpToVerify.values()[0]:
test.passes("Breakpoint at expected line (%d) inside expected file (%s)"
% (line, fileName))
return True
else:
test.fail("Breakpoint did not match expected line/file",
"Found: %d in %s" % (line, fileName))
test.verify(os.path.basename(fileName) in windowTitle,
"Verify that Creator's window title changed according to current file")
return test.compare(line, bpToVerify.values()[0],
"Compare hit breakpoint to expected line number in %s" % fileName)
else:
test.fatal("Expected a dict for bpToVerify - got '%s'" % className(bpToVerify))
return False

View File

@@ -33,7 +33,8 @@ def main():
test.log("Setting breakpoints")
result = setBreakpointsForCurrentProject(filesAndLines)
if result:
expectedBreakpointsOrder = [{"main.cpp":10}, {"main.qml":13}]
expectedBreakpointsOrder = [{os.path.join(workingDir, projectName, "main.cpp"):10},
{os.path.join(workingDir, projectName, "qml", projectName, "main.qml"):13}]
# Only use 4.7.4 to work around QTBUG-25187
availableConfigs = iterateBuildConfigs(len(checkedTargets), "Debug")
if not availableConfigs:

View File

@@ -76,15 +76,16 @@ def testSaveChangesAndMakeWritable(modifiedFiles, readOnlyFiles):
checkUnsavedChangesContains(treeWidget.model(), modifiedFiles)
clickButton(waitForObject("{text='Save All' type='QPushButton' unnamed='1' visible='1' "
"window=%s}" % saveDlgStr))
# iterating over the readOnlyFiles (order is unpredictable)
for i in range(len(readOnlyFiles)):
# iterating over the number of modified files (order is unpredictable)
for i in range(len(modifiedFiles)):
try:
currentText = str(waitForObject(readOnlyMBoxStr, 3000).text)
currentFile = filePattern.match(currentText).group(1)
clickButton(waitForObject("{text='Make Writable' type='QPushButton' unnamed='1' "
"visible='1' window=%s}" % readOnlyMBoxStr))
try:
waitForObject(cannotResetStr, 3000)
if not waitFor('__checkForMsgBoxOrQuit__(cannotResetStr)', 3000):
raise Exception('Unexpected messagebox did not appear (EXPECTED!).')
# should not be possible
test.fail("Could not reset file '%s' to writable state." % currentFile)
clickButton("{text='OK' type='QPushButton' window=%s}" % cannotResetStr)
@@ -100,8 +101,9 @@ def testSaveChangesAndMakeWritable(modifiedFiles, readOnlyFiles):
test.fail("Creator states file '%s' had been made writable - "
"but it's still read only." % currentFile)
except:
if len(readOnlyFiles) != 0:
test.fail("Missing QMessageBox about a read only file.")
if not test.verify(len(readOnlyFiles) == 0,
if not test.compare(len(readOnlyFiles), 0,
"Checking whether all files have been handled correctly."):
try:
invokeMenuItem("File", "Exit")
@@ -111,6 +113,9 @@ def testSaveChangesAndMakeWritable(modifiedFiles, readOnlyFiles):
except:
pass
def __checkForMsgBoxOrQuit__(crs):
return currentApplicationContext().isRunning and object.exists(crs)
def checkOpenDocumentsContains(itemName):
openDocsTreeViewModel = waitForObject(":OpenDocuments_Widget").model()
result = None

View File

@@ -212,6 +212,7 @@ def __lowerStrs__(iterable):
yield it
def __checkCreatedSettings__(settingsFolder):
waitForCleanShutdown()
qtProj = os.path.join(settingsFolder, "QtProject")
folders = []
files = [{os.path.join(qtProj, "QtCreator.db"):0},

View File

@@ -15,6 +15,8 @@ def main():
clickButton(waitForObject(":Options.OK_QPushButton"))
clickButton(waitForObject(":Restart required.OK_QPushButton"))
invokeMenuItem("File", "Exit")
waitForCleanShutdown()
snooze(4) # wait for complete unloading of Creator
overrideStartApplication()
startApplication("qtcreator" + SettingsPath)
try:
@@ -26,5 +28,6 @@ def main():
except:
test.fail("Creator seems to be missing %s translation" % languageName)
sendEvent("QCloseEvent", ":Qt Creator_Core::Internal::MainWindow")
waitForCleanShutdown()
__removeTestingDir__()
copySettingsToTmpDir()

View File

@@ -36,7 +36,7 @@ int main()
lower = strdup("asdf");
while (*lower)
*(lower++);
lower++;
return 0;
}