forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.6'
This commit is contained in:
3
dist/changes-2.6.0
vendored
3
dist/changes-2.6.0
vendored
@@ -45,5 +45,8 @@ FakeVim
|
||||
|
||||
Version control plugins
|
||||
|
||||
Madde
|
||||
* Remove generic MeeGo support due to complete irrelevance
|
||||
|
||||
Additional credits go to:
|
||||
|
||||
|
||||
BIN
doc/images/qtcreator-gerrit-options.png
Normal file
BIN
doc/images/qtcreator-gerrit-options.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
BIN
doc/images/qtcreator-gerrit.png
Normal file
BIN
doc/images/qtcreator-gerrit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.4 KiB |
@@ -258,6 +258,10 @@
|
||||
index. This returns your working copy to the state it was in right
|
||||
after the last commit.
|
||||
|
||||
\o \gui{Reset...} opens a dialog where you can select the SHA1 to reset
|
||||
the working directory to. This is useful after applying patches for
|
||||
review, for example.
|
||||
|
||||
\endlist
|
||||
|
||||
\section2 Viewing Status
|
||||
@@ -327,6 +331,10 @@
|
||||
Git is a fast decentralized version control system. Git is available
|
||||
for Windows, Linux and Mac.
|
||||
|
||||
You can use the \l{http://code.google.com/p/gerrit/}{Gerrit} code review
|
||||
tool for projects that use Git. You can apply and check out changes from
|
||||
Gerrit in \QC 2.6 and later.
|
||||
|
||||
The \gui Git submenu contains the following additional items:
|
||||
|
||||
\table
|
||||
@@ -375,6 +383,9 @@
|
||||
\row
|
||||
\o \gui{Amend Last Commit}
|
||||
\o Revert the last commit.
|
||||
\row
|
||||
\o \gui Gerrit
|
||||
\o View, apply, and check out changes from Gerrit.
|
||||
|
||||
\endtable
|
||||
|
||||
@@ -475,6 +486,32 @@
|
||||
on top of the current working tree state.
|
||||
\endtable
|
||||
|
||||
\section3 Reviewing Code with Gerrit
|
||||
|
||||
If your Git project uses Gerrit for code reviews, you can view your changes
|
||||
in \QC.
|
||||
|
||||
Select \gui Tools > \gui Options > \gui {Version Control} > \gui Gerrit to
|
||||
specify the connection to the Gerrit server.
|
||||
|
||||
\image qtcreator-gerrit-options.png
|
||||
|
||||
You can see the same information about each change as in the Gerrit
|
||||
web interface.
|
||||
|
||||
\image qtcreator-gerrit.png
|
||||
|
||||
To view details of the selected change, select \gui Diff.
|
||||
|
||||
To apply the selected change to the top of your local repository, select
|
||||
\gui Apply. To remove the change after testing it, select \gui Tools >
|
||||
\gui Git > \gui {Reset}. In the \gui {Undo Changes to} dialog, select the
|
||||
state to reset the working directory to, and then select \gui OK.
|
||||
|
||||
To check out the change in a headless state, select \gui Checkout.
|
||||
|
||||
To refresh the list of changes, select \gui Refresh.
|
||||
|
||||
\section2 Using Additional Mercurial Functionality
|
||||
|
||||
Mercurial is a free, distributed source control management tool.
|
||||
|
||||
@@ -1350,6 +1350,7 @@ class Dumper:
|
||||
|
||||
type = value.type.unqualified()
|
||||
typeName = str(type)
|
||||
tryDynamic &= self.useDynamicType
|
||||
|
||||
# FIXME: Gui shows references stripped?
|
||||
#warn(" ")
|
||||
@@ -1638,7 +1639,7 @@ class Dumper:
|
||||
check(False)
|
||||
|
||||
|
||||
if self.useDynamicType and tryDynamic:
|
||||
if tryDynamic:
|
||||
self.putItem(expensiveDowncast(value), False)
|
||||
return
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
s/private\/qdeclarative/qml/g
|
||||
s/qdeclarative/qml/g
|
||||
s/qqml/qml/g
|
||||
s/QDECLARATIVE/QML/g
|
||||
s/QDeclarative/Qml/g
|
||||
s/Q_DECLARATIVE_EXPORT //g
|
||||
s/QQml/Qml/g
|
||||
s/QQMLJS/QMLJS/g
|
||||
s/Q_QML_EXPORT //g
|
||||
|
||||
# adjust pri file
|
||||
s/ \$\$PWD\/qmljsglobal_p.h/ $$PWD\/qmljsglobal_p.h \\\
|
||||
|
||||
@@ -2,20 +2,29 @@
|
||||
|
||||
me=$(dirname $0)
|
||||
|
||||
for i in $QTDIR/src/declarative/qml/parser/*.{g,h,cpp,pri}; do
|
||||
sed -f $me/cmd.sed $i > $me/$(echo $(basename $i) | sed s/qdeclarativejs/qmljs/)
|
||||
for i in $QTDIR/src/qml/qml/parser/*.{g,h,cpp,pri}; do
|
||||
sed -f $me/cmd.sed $i > $me/$(echo $(basename $i) | sed s/qqmljs/qmljs/)
|
||||
done
|
||||
|
||||
for i in $QTDIR/src/declarative/qml/qdeclarative{error.{h,cpp},dirparser{_p.h,.cpp}}; do
|
||||
sed -f $me/cmd.sed $i > $me/$(echo $(basename $i) | sed s/qdeclarative/qml/)
|
||||
for i in $QTDIR/src/qml/qml/qqml{error.{h,cpp},dirparser{_p.h,.cpp}}; do
|
||||
sed -f $me/cmd.sed $i > $me/$(echo $(basename $i) | sed s/qqml/qml/)
|
||||
done
|
||||
|
||||
# export QmlDirParser
|
||||
perl -p -0777 -i -e 's/QT_BEGIN_NAMESPACE\n\nclass QmlError;\nclass QmlDirParser/#include "qmljsglobal_p.h"\n\nQT_BEGIN_NAMESPACE\n\nclass QmlError;\nclass QML_PARSER_EXPORT QmlDirParser/' qmldirparser_p.h
|
||||
perl -p -0777 -i -e 's/QT_BEGIN_NAMESPACE\n\nclass QmlError;\nclass QmlEngine;\nclass Q_AUTOTEST_EXPORT QmlDirParser/#include "qmljsglobal_p.h"\n\nQT_BEGIN_NAMESPACE\n\nclass QmlError;\nclass QmlEngine;\nclass QML_PARSER_EXPORT QmlDirParser/' qmldirparser_p.h
|
||||
# export QmlJSGrammar
|
||||
perl -p -0777 -i -e 's/#include <QtCore\/qglobal.h>\n\nQT_BEGIN_NAMESPACE\n\nclass QmlJSGrammar\n/#include "qmljsglobal_p.h"\n#include <QtCore\/qglobal.h>\n\nQT_BEGIN_NAMESPACE\n\nclass QML_PARSER_EXPORT QmlJSGrammar\n/' qmljsgrammar_p.h
|
||||
# replace qmlglobal_p.h include with needed declaration
|
||||
perl -p -0777 -i -e 's/#include \"qmlglobal_p.h\"/bool Qml_isFileCaseCorrect(const QString &) { return true; }/' qmldirparser.cpp
|
||||
# remove qmlglobal_p.h include
|
||||
perl -p -0777 -i -e 's/#include \"qmlglobal_p.h\"//' qmldirparser.cpp
|
||||
# remove qmlglobal_p.h include
|
||||
perl -p -0777 -i -e 's/#include \<QtQml\/qmlfile.h\>//' qmldirparser.cpp
|
||||
# remove QtQml/qtqmlglobal.h include
|
||||
perl -p -0777 -i -e 's/#include \<QtQml\/qtqmlglobal.h\>//' qmlerror.h
|
||||
# replace private/qhashedstring_p.h include and QHashedStringRef
|
||||
perl -p -0777 -i -e 's/#include \<private\/qhashedstring_p.h\>//' qmldirparser_p.h
|
||||
perl -p -0777 -i -e 's/QHashedStringRef/QString/g' qmldirparser_p.h qmldirparser.cpp
|
||||
# don't use the new QVarLengthArray::length()
|
||||
sed -i -e 's/chars.length()/chars.size()/' $me/qmljslexer.cpp
|
||||
|
||||
./changeLicense.py $me/../qmljs_global.h qml*.{cpp,h}
|
||||
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
diff --git b/src/libs/qmljs/parser/qmljs.g a/src/libs/qmljs/parser/qmljs.g
|
||||
index 6888b65..784e47f 100644
|
||||
--- b/src/libs/qmljs/parser/qmljs.g
|
||||
+++ a/src/libs/qmljs/parser/qmljs.g
|
||||
@@ -1,23 +1,32 @@
|
||||
diff --git a/src/libs/qmljs/parser/qmljs.g b/src/libs/qmljs/parser/qmljs.g
|
||||
index 069be3c..9cbdc23 100644
|
||||
--- a/src/libs/qmljs/parser/qmljs.g
|
||||
+++ b/src/libs/qmljs/parser/qmljs.g
|
||||
@@ -1,23 +1,30 @@
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
--- Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
--- All rights reserved.
|
||||
+-- This file is part of Qt Creator
|
||||
+--
|
||||
+-- Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
+--
|
||||
-- Contact: http://www.qt-project.org/
|
||||
--
|
||||
--- This file is part of the QtDeclarative module of the Qt Toolkit.
|
||||
--- This file is part of the QtQml module of the Qt Toolkit.
|
||||
--
|
||||
--- $QT_BEGIN_LICENSE:LGPL-ONLY$
|
||||
-- GNU Lesser General Public License Usage
|
||||
@@ -23,7 +22,9 @@ index 6888b65..784e47f 100644
|
||||
--- packaging of this file. Please review the following information to
|
||||
--- ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
--- will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
+--
|
||||
--
|
||||
--- If you have questions regarding the use of this file, please contact
|
||||
--- us via http://www.qt-project.org/.
|
||||
+-- This file may be used under the terms of the GNU Lesser General Public
|
||||
+-- License version 2.1 as published by the Free Software Foundation and
|
||||
+-- appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
@@ -44,7 +45,7 @@ index 6888b65..784e47f 100644
|
||||
--
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
@@ -83,46 +92,37 @@
|
||||
@@ -83,46 +90,36 @@
|
||||
|
||||
%start TopLevel
|
||||
|
||||
@@ -56,10 +57,9 @@ index 6888b65..784e47f 100644
|
||||
+** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
-** All rights reserved.
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
-** This file is part of the QtDeclarative module of the Qt Toolkit.
|
||||
-** This file is part of the QtQml module of the Qt Toolkit.
|
||||
**
|
||||
-** $QT_BEGIN_LICENSE:LGPL$
|
||||
** GNU Lesser General Public License Usage
|
||||
@@ -95,14 +95,16 @@ index 6888b65..784e47f 100644
|
||||
-**
|
||||
-**
|
||||
-**
|
||||
-**
|
||||
-** $QT_END_LICENSE$
|
||||
-**
|
||||
-****************************************************************************/
|
||||
+**************************************************************************/
|
||||
+
|
||||
|
||||
#include <QtCore/QtDebug>
|
||||
#include <QtCore/QCoreApplication>
|
||||
@@ -136,46 +136,37 @@
|
||||
@@ -136,46 +133,36 @@
|
||||
|
||||
./
|
||||
|
||||
@@ -114,10 +116,9 @@ index 6888b65..784e47f 100644
|
||||
+** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
-** All rights reserved.
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
-** This file is part of the QtDeclarative module of the Qt Toolkit.
|
||||
-** This file is part of the QtQml module of the Qt Toolkit.
|
||||
**
|
||||
-** $QT_BEGIN_LICENSE:LGPL$
|
||||
** GNU Lesser General Public License Usage
|
||||
@@ -153,10 +154,12 @@ index 6888b65..784e47f 100644
|
||||
-**
|
||||
-**
|
||||
-**
|
||||
-**
|
||||
-** $QT_END_LICENSE$
|
||||
-**
|
||||
-****************************************************************************/
|
||||
+**************************************************************************/
|
||||
+
|
||||
|
||||
|
||||
//
|
||||
@@ -164,7 +167,7 @@ diff --git b/src/libs/qmljs/parser/qmljsengine_p.cpp a/src/libs/qmljs/parser/qml
|
||||
index 5b204c9..10e39ab 100644
|
||||
--- b/src/libs/qmljs/parser/qmljsengine_p.cpp
|
||||
+++ a/src/libs/qmljs/parser/qmljsengine_p.cpp
|
||||
@@ -113,7 +113,7 @@ double integerFromString(const QString &str, int radix)
|
||||
@@ -111,7 +111,7 @@ double integerFromString(const QString &str, int radix)
|
||||
|
||||
|
||||
Engine::Engine()
|
||||
@@ -173,7 +176,7 @@ index 5b204c9..10e39ab 100644
|
||||
{ }
|
||||
|
||||
Engine::~Engine()
|
||||
@@ -134,6 +134,12 @@ Lexer *Engine::lexer() const
|
||||
@@ -132,6 +132,12 @@ Lexer *Engine::lexer() const
|
||||
void Engine::setLexer(Lexer *lexer)
|
||||
{ _lexer = lexer; }
|
||||
|
||||
@@ -190,7 +193,7 @@ diff --git b/src/libs/qmljs/parser/qmljsengine_p.h a/src/libs/qmljs/parser/qmljs
|
||||
index 5057ea0..487619e 100644
|
||||
--- b/src/libs/qmljs/parser/qmljsengine_p.h
|
||||
+++ a/src/libs/qmljs/parser/qmljsengine_p.h
|
||||
@@ -56,6 +56,7 @@ QT_QML_BEGIN_NAMESPACE
|
||||
@@ -54,6 +54,7 @@ QT_QML_BEGIN_NAMESPACE
|
||||
namespace QmlJS {
|
||||
|
||||
class Lexer;
|
||||
@@ -198,7 +201,7 @@ index 5057ea0..487619e 100644
|
||||
class MemoryPool;
|
||||
|
||||
class QML_PARSER_EXPORT DiagnosticMessage
|
||||
@@ -83,6 +84,7 @@ public:
|
||||
@@ -81,6 +82,7 @@ public:
|
||||
class QML_PARSER_EXPORT Engine
|
||||
{
|
||||
Lexer *_lexer;
|
||||
@@ -206,7 +209,7 @@ index 5057ea0..487619e 100644
|
||||
MemoryPool _pool;
|
||||
QList<AST::SourceLocation> _comments;
|
||||
QString _extraCode;
|
||||
@@ -100,6 +102,9 @@ public:
|
||||
@@ -98,6 +100,9 @@ public:
|
||||
Lexer *lexer() const;
|
||||
void setLexer(Lexer *lexer);
|
||||
|
||||
@@ -220,7 +223,7 @@ diff --git b/src/libs/qmljs/parser/qmljsparser.cpp a/src/libs/qmljs/parser/qmljs
|
||||
index a731c1a..e986534 100644
|
||||
--- b/src/libs/qmljs/parser/qmljsparser.cpp
|
||||
+++ a/src/libs/qmljs/parser/qmljsparser.cpp
|
||||
@@ -138,7 +138,20 @@ bool Parser::parse(int startToken)
|
||||
@@ -137,7 +137,20 @@ bool Parser::parse(int startToken)
|
||||
|
||||
token_buffer[0].token = startToken;
|
||||
first_token = &token_buffer[0];
|
||||
|
||||
@@ -10,7 +10,7 @@ HEADERS += \
|
||||
$$PWD/qmljsglobal_p.h \
|
||||
$$PWD/qmldirparser_p.h \
|
||||
$$PWD/qmlerror.h \
|
||||
$$PWD/qmljskeywords_p.h
|
||||
$$PWD/qmljskeywords_p.h \
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/qmljsast.cpp \
|
||||
@@ -20,4 +20,4 @@ SOURCES += \
|
||||
$$PWD/qmljslexer.cpp \
|
||||
$$PWD/qmljsparser.cpp \
|
||||
$$PWD/qmldirparser.cpp \
|
||||
$$PWD/qmlerror.cpp
|
||||
$$PWD/qmlerror.cpp \
|
||||
|
||||
@@ -30,16 +30,31 @@
|
||||
|
||||
#include "qmldirparser_p.h"
|
||||
#include "qmlerror.h"
|
||||
bool Qml_isFileCaseCorrect(const QString &) { return true; }
|
||||
|
||||
#include <QTextStream>
|
||||
#include <QFile>
|
||||
#include <QtDebug>
|
||||
|
||||
|
||||
#include <QtCore/QtDebug>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
static int parseInt(const QStringRef &str, bool *ok)
|
||||
{
|
||||
int pos = 0;
|
||||
int number = 0;
|
||||
while (pos < str.length() && str.at(pos).isDigit()) {
|
||||
if (pos != 0)
|
||||
number *= 10;
|
||||
number += str.at(pos).unicode() - '0';
|
||||
++pos;
|
||||
}
|
||||
if (pos != str.length())
|
||||
*ok = false;
|
||||
else
|
||||
*ok = true;
|
||||
return number;
|
||||
}
|
||||
|
||||
QmlDirParser::QmlDirParser()
|
||||
: _isParsed(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -47,116 +62,99 @@ QmlDirParser::~QmlDirParser()
|
||||
{
|
||||
}
|
||||
|
||||
QUrl QmlDirParser::url() const
|
||||
{
|
||||
return _url;
|
||||
inline static void scanSpace(const QChar *&ch) {
|
||||
while (ch->isSpace() && !ch->isNull() && *ch != QLatin1Char('\n'))
|
||||
++ch;
|
||||
}
|
||||
|
||||
void QmlDirParser::setUrl(const QUrl &url)
|
||||
{
|
||||
_url = url;
|
||||
inline static void scanToEnd(const QChar *&ch) {
|
||||
while (*ch != QLatin1Char('\n') && !ch->isNull())
|
||||
++ch;
|
||||
}
|
||||
|
||||
QString QmlDirParser::fileSource() const
|
||||
{
|
||||
return _filePathSouce;
|
||||
inline static void scanWord(const QChar *&ch) {
|
||||
while (!ch->isSpace() && !ch->isNull())
|
||||
++ch;
|
||||
}
|
||||
|
||||
void QmlDirParser::setFileSource(const QString &filePath)
|
||||
/*!
|
||||
\a url is used for generating errors.
|
||||
*/
|
||||
bool QmlDirParser::parse(const QString &source)
|
||||
{
|
||||
_filePathSouce = filePath;
|
||||
}
|
||||
|
||||
QString QmlDirParser::source() const
|
||||
{
|
||||
return _source;
|
||||
}
|
||||
|
||||
void QmlDirParser::setSource(const QString &source)
|
||||
{
|
||||
_isParsed = false;
|
||||
_source = source;
|
||||
}
|
||||
|
||||
bool QmlDirParser::isParsed() const
|
||||
{
|
||||
return _isParsed;
|
||||
}
|
||||
|
||||
bool QmlDirParser::parse()
|
||||
{
|
||||
if (_isParsed)
|
||||
return true;
|
||||
|
||||
_isParsed = true;
|
||||
_errors.clear();
|
||||
_plugins.clear();
|
||||
_components.clear();
|
||||
_scripts.clear();
|
||||
|
||||
if (_source.isEmpty() && !_filePathSouce.isEmpty()) {
|
||||
QFile file(_filePathSouce);
|
||||
if (!Qml_isFileCaseCorrect(_filePathSouce)) {
|
||||
QmlError error;
|
||||
error.setDescription(QString::fromUtf8("cannot load module \"$$URI$$\": File name case mismatch for \"%1\"").arg(_filePathSouce));
|
||||
_errors.prepend(error);
|
||||
return false;
|
||||
} else if (file.open(QFile::ReadOnly)) {
|
||||
_source = QString::fromUtf8(file.readAll());
|
||||
} else {
|
||||
QmlError error;
|
||||
error.setDescription(QString::fromUtf8("module \"$$URI$$\" definition \"%1\" not readable").arg(_filePathSouce));
|
||||
_errors.prepend(error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
QTextStream stream(&_source);
|
||||
int lineNumber = 0;
|
||||
bool firstLine = true;
|
||||
|
||||
forever {
|
||||
const QChar *ch = source.constData();
|
||||
while (!ch->isNull()) {
|
||||
++lineNumber;
|
||||
|
||||
const QString line = stream.readLine();
|
||||
if (line.isNull())
|
||||
bool invalidLine = false;
|
||||
const QChar *lineStart = ch;
|
||||
|
||||
scanSpace(ch);
|
||||
if (*ch == QLatin1Char('\n')) {
|
||||
++ch;
|
||||
continue;
|
||||
}
|
||||
if (ch->isNull())
|
||||
break;
|
||||
|
||||
QString sections[3];
|
||||
int sectionCount = 0;
|
||||
|
||||
int index = 0;
|
||||
const int length = line.length();
|
||||
|
||||
while (index != length) {
|
||||
const QChar ch = line.at(index);
|
||||
|
||||
if (ch.isSpace()) {
|
||||
do { ++index; }
|
||||
while (index != length && line.at(index).isSpace());
|
||||
|
||||
} else if (ch == QLatin1Char('#')) {
|
||||
// recognized a comment
|
||||
do {
|
||||
if (*ch == QLatin1Char('#')) {
|
||||
scanToEnd(ch);
|
||||
break;
|
||||
|
||||
}
|
||||
const QChar *start = ch;
|
||||
scanWord(ch);
|
||||
if (sectionCount < 3) {
|
||||
sections[sectionCount++] = source.mid(start-source.constData(), ch-start);
|
||||
} else {
|
||||
const int start = index;
|
||||
|
||||
do { ++index; }
|
||||
while (index != length && !line.at(index).isSpace());
|
||||
|
||||
const QString lexeme = line.mid(start, index - start);
|
||||
|
||||
if (sectionCount >= 3) {
|
||||
reportError(lineNumber, start, QLatin1String("unexpected token"));
|
||||
|
||||
} else {
|
||||
sections[sectionCount++] = lexeme;
|
||||
}
|
||||
}
|
||||
reportError(lineNumber, start-lineStart, QLatin1String("unexpected token"));
|
||||
scanToEnd(ch);
|
||||
invalidLine = true;
|
||||
break;
|
||||
}
|
||||
scanSpace(ch);
|
||||
} while (*ch != QLatin1Char('\n') && !ch->isNull());
|
||||
|
||||
if (sectionCount == 0) {
|
||||
if (!ch->isNull())
|
||||
++ch;
|
||||
|
||||
if (invalidLine) {
|
||||
reportError(lineNumber, -1,
|
||||
QString::fromUtf8("invalid qmldir directive contains too many tokens"));
|
||||
continue;
|
||||
} else if (sectionCount == 0) {
|
||||
continue; // no sections, no party.
|
||||
|
||||
} else if (sections[0] == QLatin1String("module")) {
|
||||
if (sectionCount != 2) {
|
||||
reportError(lineNumber, -1,
|
||||
QString::fromUtf8("module directive requires one argument, but %1 were provided").arg(sectionCount - 1));
|
||||
continue;
|
||||
}
|
||||
if (!_typeNamespace.isEmpty()) {
|
||||
reportError(lineNumber, -1,
|
||||
QString::fromUtf8("only one module directive may be defined in a qmldir file"));
|
||||
continue;
|
||||
}
|
||||
if (!firstLine) {
|
||||
reportError(lineNumber, -1,
|
||||
QString::fromUtf8("module directive must be the first directive in a qmldir file"));
|
||||
continue;
|
||||
}
|
||||
|
||||
_typeNamespace = sections[1];
|
||||
|
||||
} else if (sections[0] == QLatin1String("plugin")) {
|
||||
if (sectionCount < 2) {
|
||||
reportError(lineNumber, -1,
|
||||
@@ -177,7 +175,7 @@ bool QmlDirParser::parse()
|
||||
}
|
||||
Component entry(sections[1], sections[2], -1, -1);
|
||||
entry.internal = true;
|
||||
_components.append(entry);
|
||||
_components.insertMulti(entry.typeName, entry);
|
||||
} else if (sections[0] == QLatin1String("typeinfo")) {
|
||||
if (sectionCount != 2) {
|
||||
reportError(lineNumber, -1,
|
||||
@@ -192,7 +190,7 @@ bool QmlDirParser::parse()
|
||||
} else if (sectionCount == 2) {
|
||||
// No version specified (should only be used for relative qmldir files)
|
||||
const Component entry(sections[0], sections[1], -1, -1);
|
||||
_components.append(entry);
|
||||
_components.insertMulti(entry.typeName, entry);
|
||||
} else if (sectionCount == 3) {
|
||||
const QString &version = sections[1];
|
||||
const int dotIndex = version.indexOf(QLatin1Char('.'));
|
||||
@@ -203,15 +201,22 @@ bool QmlDirParser::parse()
|
||||
reportError(lineNumber, -1, QLatin1String("unexpected '.'"));
|
||||
} else {
|
||||
bool validVersionNumber = false;
|
||||
const int majorVersion = version.left(dotIndex).toInt(&validVersionNumber);
|
||||
const int majorVersion = parseInt(QStringRef(&version, 0, dotIndex), &validVersionNumber);
|
||||
|
||||
if (validVersionNumber) {
|
||||
const int minorVersion = version.mid(dotIndex + 1).toInt(&validVersionNumber);
|
||||
const int minorVersion = parseInt(QStringRef(&version, dotIndex+1, version.length()-dotIndex-1), &validVersionNumber);
|
||||
|
||||
if (validVersionNumber) {
|
||||
const Component entry(sections[0], sections[2], majorVersion, minorVersion);
|
||||
const QString &fileName = sections[2];
|
||||
|
||||
_components.append(entry);
|
||||
if (fileName.endsWith(QLatin1String(".js"))) {
|
||||
// A 'js' extension indicates a namespaced script import
|
||||
const Script entry(sections[0], fileName, majorVersion, minorVersion);
|
||||
_scripts.append(entry);
|
||||
} else {
|
||||
const Component entry(sections[0], fileName, majorVersion, minorVersion);
|
||||
_components.insertMulti(entry.typeName, entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -219,6 +224,8 @@ bool QmlDirParser::parse()
|
||||
reportError(lineNumber, -1,
|
||||
QString::fromUtf8("a component declaration requires two or three arguments, but %1 were provided").arg(sectionCount));
|
||||
}
|
||||
|
||||
firstLine = false;
|
||||
}
|
||||
|
||||
return hasError();
|
||||
@@ -227,7 +234,6 @@ bool QmlDirParser::parse()
|
||||
void QmlDirParser::reportError(int line, int column, const QString &description)
|
||||
{
|
||||
QmlError error;
|
||||
error.setUrl(_url);
|
||||
error.setLine(line);
|
||||
error.setColumn(column);
|
||||
error.setDescription(description);
|
||||
@@ -242,28 +248,51 @@ bool QmlDirParser::hasError() const
|
||||
return false;
|
||||
}
|
||||
|
||||
void QmlDirParser::setError(const QmlError &e)
|
||||
{
|
||||
_errors.clear();
|
||||
_errors.append(e);
|
||||
}
|
||||
|
||||
QList<QmlError> QmlDirParser::errors(const QString &uri) const
|
||||
{
|
||||
QUrl url(uri);
|
||||
QList<QmlError> errors = _errors;
|
||||
for (int i = 0; i < errors.size(); ++i) {
|
||||
QmlError &e = errors[i];
|
||||
QString description = e.description();
|
||||
description.replace(QLatin1String("$$URI$$"), uri);
|
||||
e.setDescription(description);
|
||||
e.setUrl(url);
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
QString QmlDirParser::typeNamespace() const
|
||||
{
|
||||
return _typeNamespace;
|
||||
}
|
||||
|
||||
void QmlDirParser::setTypeNamespace(const QString &s)
|
||||
{
|
||||
_typeNamespace = s;
|
||||
}
|
||||
|
||||
QList<QmlDirParser::Plugin> QmlDirParser::plugins() const
|
||||
{
|
||||
return _plugins;
|
||||
}
|
||||
|
||||
QList<QmlDirParser::Component> QmlDirParser::components() const
|
||||
QHash<QString,QmlDirParser::Component> QmlDirParser::components() const
|
||||
{
|
||||
return _components;
|
||||
}
|
||||
|
||||
QList<QmlDirParser::Script> QmlDirParser::scripts() const
|
||||
{
|
||||
return _scripts;
|
||||
}
|
||||
|
||||
#ifdef QT_CREATOR
|
||||
QList<QmlDirParser::TypeInfo> QmlDirParser::typeInfos() const
|
||||
{
|
||||
@@ -271,4 +300,18 @@ QList<QmlDirParser::TypeInfo> QmlDirParser::typeInfos() const
|
||||
}
|
||||
#endif
|
||||
|
||||
QDebug &operator<< (QDebug &debug, const QmlDirParser::Component &component)
|
||||
{
|
||||
const QString output = QString::fromLatin1("{%1 %2.%3}").
|
||||
arg(component.typeName).arg(component.majorVersion).arg(component.minorVersion);
|
||||
return debug << qPrintable(output);
|
||||
}
|
||||
|
||||
QDebug &operator<< (QDebug &debug, const QmlDirParser::Script &script)
|
||||
{
|
||||
const QString output = QString::fromLatin1("{%1 %2.%3}").
|
||||
arg(script.nameSpace).arg(script.majorVersion).arg(script.minorVersion);
|
||||
return debug << qPrintable(output);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef QMLDIRPARSER_P_H
|
||||
#define QMLDIRPARSER_P_H
|
||||
#ifndef QQMLDIRPARSER_P_H
|
||||
#define QQMLDIRPARSER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
@@ -42,14 +42,17 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QUrl>
|
||||
#include <QHash>
|
||||
#include <QtCore/QUrl>
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
|
||||
#include "qmljsglobal_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QmlError;
|
||||
class QmlEngine;
|
||||
class QML_PARSER_EXPORT QmlDirParser
|
||||
{
|
||||
Q_DISABLE_COPY(QmlDirParser)
|
||||
@@ -58,21 +61,15 @@ public:
|
||||
QmlDirParser();
|
||||
~QmlDirParser();
|
||||
|
||||
QUrl url() const;
|
||||
void setUrl(const QUrl &url);
|
||||
|
||||
QString fileSource() const;
|
||||
void setFileSource(const QString &filePath);
|
||||
|
||||
QString source() const;
|
||||
void setSource(const QString &source);
|
||||
|
||||
bool isParsed() const;
|
||||
bool parse();
|
||||
bool parse(const QString &source);
|
||||
|
||||
bool hasError() const;
|
||||
void setError(const QmlError &);
|
||||
QList<QmlError> errors(const QString &uri) const;
|
||||
|
||||
QString typeNamespace() const;
|
||||
void setTypeNamespace(const QString &s);
|
||||
|
||||
struct Plugin
|
||||
{
|
||||
Plugin() {}
|
||||
@@ -100,7 +97,22 @@ public:
|
||||
bool internal;
|
||||
};
|
||||
|
||||
QList<Component> components() const;
|
||||
struct Script
|
||||
{
|
||||
Script()
|
||||
: majorVersion(0), minorVersion(0) {}
|
||||
|
||||
Script(const QString &nameSpace, const QString &fileName, int majorVersion, int minorVersion)
|
||||
: nameSpace(nameSpace), fileName(fileName), majorVersion(majorVersion), minorVersion(minorVersion) {}
|
||||
|
||||
QString nameSpace;
|
||||
QString fileName;
|
||||
int majorVersion;
|
||||
int minorVersion;
|
||||
};
|
||||
|
||||
QHash<QString,Component> components() const;
|
||||
QList<Script> scripts() const;
|
||||
QList<Plugin> plugins() const;
|
||||
|
||||
#ifdef QT_CREATOR
|
||||
@@ -121,20 +133,22 @@ private:
|
||||
|
||||
private:
|
||||
QList<QmlError> _errors;
|
||||
QUrl _url;
|
||||
QString _source;
|
||||
QString _filePathSouce;
|
||||
QList<Component> _components;
|
||||
QString _typeNamespace;
|
||||
QHash<QString,Component> _components; // multi hash
|
||||
QList<Script> _scripts;
|
||||
QList<Plugin> _plugins;
|
||||
#ifdef QT_CREATOR
|
||||
QList<TypeInfo> _typeInfos;
|
||||
#endif
|
||||
unsigned _isParsed: 1;
|
||||
};
|
||||
|
||||
typedef QList<QmlDirParser::Component> QmlDirComponents;
|
||||
typedef QHash<QString,QmlDirParser::Component> QmlDirComponents;
|
||||
typedef QList<QmlDirParser::Script> QmlDirScripts;
|
||||
typedef QList<QmlDirParser::Plugin> QmlDirPlugins;
|
||||
|
||||
QDebug &operator<< (QDebug &, const QmlDirParser::Component &);
|
||||
QDebug &operator<< (QDebug &, const QmlDirParser::Script &);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QMLDIRPARSER_P_H
|
||||
#endif // QQMLDIRPARSER_P_H
|
||||
|
||||
@@ -30,15 +30,16 @@
|
||||
|
||||
#include "qmlerror.h"
|
||||
|
||||
#include <qdebug.h>
|
||||
#include <qfile.h>
|
||||
#include <qstringlist.h>
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <QtCore/qfile.h>
|
||||
#include <QtCore/qstringlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QmlError
|
||||
\since 4.7
|
||||
\since 5.0
|
||||
\inmodule QtQml
|
||||
\brief The QmlError class encapsulates a QML error.
|
||||
|
||||
QmlError includes a textual description of the error, as well
|
||||
@@ -58,7 +59,9 @@ QT_BEGIN_NAMESPACE
|
||||
^
|
||||
\endcode
|
||||
|
||||
\sa QmlView::errors(), QmlComponent::errors()
|
||||
Note that the QtQuick 1 version is named QDeclarativeError
|
||||
|
||||
\sa QQuickView::errors(), QmlComponent::errors()
|
||||
*/
|
||||
class QmlErrorPrivate
|
||||
{
|
||||
|
||||
@@ -28,17 +28,18 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef QMLERROR_H
|
||||
#define QMLERROR_H
|
||||
#ifndef QQMLERROR_H
|
||||
#define QQMLERROR_H
|
||||
|
||||
#include <qurl.h>
|
||||
#include <qstring.h>
|
||||
|
||||
|
||||
#include <QtCore/qurl.h>
|
||||
#include <QtCore/qstring.h>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QT_MODULE(Declarative)
|
||||
|
||||
class QDebug;
|
||||
class QmlErrorPrivate;
|
||||
@@ -68,8 +69,10 @@ private:
|
||||
|
||||
QDebug operator<<(QDebug debug, const QmlError &error);
|
||||
|
||||
Q_DECLARE_TYPEINFO(QmlError, Q_MOVABLE_TYPE);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QMLERROR_H
|
||||
#endif // QQMLERROR_H
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
%parser QmlJSGrammar
|
||||
%decl qmljsparser_p.h
|
||||
%impl qmljsparser.cpp
|
||||
%impl qdeclarativejsparser.cpp
|
||||
%expect 2
|
||||
%expect-rr 2
|
||||
|
||||
@@ -120,6 +120,7 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#include <QtCore/QtDebug>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
@@ -163,6 +164,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
@@ -383,10 +385,10 @@ void Parser::reallocateStack()
|
||||
else
|
||||
stack_size <<= 1;
|
||||
|
||||
sym_stack = reinterpret_cast<Value*> (qRealloc(sym_stack, stack_size * sizeof(Value)));
|
||||
state_stack = reinterpret_cast<int*> (qRealloc(state_stack, stack_size * sizeof(int)));
|
||||
location_stack = reinterpret_cast<AST::SourceLocation*> (qRealloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
|
||||
string_stack = reinterpret_cast<QStringRef*> (qRealloc(string_stack, stack_size * sizeof(QStringRef)));
|
||||
sym_stack = reinterpret_cast<Value*> (realloc(sym_stack, stack_size * sizeof(Value)));
|
||||
state_stack = reinterpret_cast<int*> (realloc(state_stack, stack_size * sizeof(int)));
|
||||
location_stack = reinterpret_cast<AST::SourceLocation*> (realloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
|
||||
string_stack = reinterpret_cast<QStringRef*> (realloc(string_stack, stack_size * sizeof(QStringRef)));
|
||||
}
|
||||
|
||||
Parser::Parser(Engine *engine):
|
||||
@@ -406,10 +408,10 @@ Parser::Parser(Engine *engine):
|
||||
Parser::~Parser()
|
||||
{
|
||||
if (stack_size) {
|
||||
qFree(sym_stack);
|
||||
qFree(state_stack);
|
||||
qFree(location_stack);
|
||||
qFree(string_stack);
|
||||
free(sym_stack);
|
||||
free(state_stack);
|
||||
free(location_stack);
|
||||
free(string_stack);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "qmljsglobal_p.h"
|
||||
#include "qmljsmemorypool_p.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QtCore/QString>
|
||||
|
||||
QT_QML_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "qmljsglobal_p.h"
|
||||
|
||||
#include <qglobal.h>
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef QMLJSGLOBAL_P_H
|
||||
#define QMLJSGLOBAL_P_H
|
||||
|
||||
#include <qglobal.h>
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifdef QT_CREATOR
|
||||
# define QT_QML_BEGIN_NAMESPACE
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#define QMLJSGRAMMAR_P_H
|
||||
|
||||
#include "qmljsglobal_p.h"
|
||||
#include <qglobal.h>
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
#include "qmljsengine_p.h"
|
||||
#include "qmljsmemorypool_p.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QVarLengthArray>
|
||||
#include <QDebug>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QVarLengthArray>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok);
|
||||
@@ -660,6 +660,17 @@ again:
|
||||
_errorMessage = QCoreApplication::translate("QmlParser", "Unclosed string at end of line");
|
||||
return T_ERROR;
|
||||
}
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
return scanNumber(ch);
|
||||
|
||||
default:
|
||||
if (ch.isLetter() || ch == QLatin1Char('$') || ch == QLatin1Char('_') || (ch == QLatin1Char('\\') && _char == QLatin1Char('u'))) {
|
||||
@@ -716,7 +727,16 @@ again:
|
||||
return kind;
|
||||
}
|
||||
}
|
||||
} else if (ch.isDigit()) {
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return T_ERROR;
|
||||
}
|
||||
|
||||
int Lexer::scanNumber(QChar ch)
|
||||
{
|
||||
if (ch != QLatin1Char('0')) {
|
||||
double integer = ch.unicode() - '0';
|
||||
|
||||
@@ -807,6 +827,12 @@ again:
|
||||
}
|
||||
}
|
||||
|
||||
if (chars.size() == 1) {
|
||||
// if we ended up with a single digit, then it was a '0'
|
||||
_tokenValue = 0;
|
||||
return T_NUMERIC_LITERAL;
|
||||
}
|
||||
|
||||
chars.append('\0');
|
||||
|
||||
const char *begin = chars.constData();
|
||||
@@ -824,12 +850,6 @@ again:
|
||||
return T_NUMERIC_LITERAL;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return T_ERROR;
|
||||
}
|
||||
|
||||
bool Lexer::scanRegExp(RegExpBodyPrefix prefix)
|
||||
{
|
||||
_tokenText.resize(0);
|
||||
@@ -959,31 +979,6 @@ bool Lexer::isOctalDigit(ushort c)
|
||||
return (c >= '0' && c <= '7');
|
||||
}
|
||||
|
||||
int Lexer::tokenKind() const
|
||||
{
|
||||
return _tokenKind;
|
||||
}
|
||||
|
||||
int Lexer::tokenOffset() const
|
||||
{
|
||||
return _tokenStartPtr - _code.unicode();
|
||||
}
|
||||
|
||||
int Lexer::tokenLength() const
|
||||
{
|
||||
return _tokenLength;
|
||||
}
|
||||
|
||||
int Lexer::tokenStartLine() const
|
||||
{
|
||||
return _tokenLine;
|
||||
}
|
||||
|
||||
int Lexer::tokenStartColumn() const
|
||||
{
|
||||
return _tokenStartPtr - _tokenLinePtr + 1;
|
||||
}
|
||||
|
||||
int Lexer::tokenEndLine() const
|
||||
{
|
||||
return _currentLineNumber;
|
||||
@@ -994,16 +989,6 @@ int Lexer::tokenEndColumn() const
|
||||
return _codePtr - _lastLinePtr;
|
||||
}
|
||||
|
||||
QStringRef Lexer::tokenSpell() const
|
||||
{
|
||||
return _tokenSpell;
|
||||
}
|
||||
|
||||
double Lexer::tokenValue() const
|
||||
{
|
||||
return _tokenValue;
|
||||
}
|
||||
|
||||
QString Lexer::tokenText() const
|
||||
{
|
||||
if (_validTokenText)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
#include "qmljsglobal_p.h"
|
||||
#include "qmljsgrammar_p.h"
|
||||
#include <QString>
|
||||
#include <QtCore/QString>
|
||||
|
||||
QT_QML_BEGIN_NAMESPACE
|
||||
|
||||
@@ -147,18 +147,18 @@ public:
|
||||
int regExpFlags() const { return _patternFlags; }
|
||||
QString regExpPattern() const { return _tokenText; }
|
||||
|
||||
int tokenKind() const;
|
||||
int tokenOffset() const;
|
||||
int tokenLength() const;
|
||||
int tokenKind() const { return _tokenKind; }
|
||||
int tokenOffset() const { return _tokenStartPtr - _code.unicode(); }
|
||||
int tokenLength() const { return _tokenLength; }
|
||||
|
||||
int tokenStartLine() const;
|
||||
int tokenStartColumn() const;
|
||||
int tokenStartLine() const { return _tokenLine; }
|
||||
int tokenStartColumn() const { return _tokenStartPtr - _tokenLinePtr + 1; }
|
||||
|
||||
int tokenEndLine() const;
|
||||
int tokenEndColumn() const;
|
||||
|
||||
QStringRef tokenSpell() const;
|
||||
double tokenValue() const;
|
||||
inline QStringRef tokenSpell() const { return _tokenSpell; }
|
||||
double tokenValue() const { return _tokenValue; }
|
||||
QString tokenText() const;
|
||||
|
||||
Error errorCode() const;
|
||||
@@ -180,6 +180,7 @@ protected:
|
||||
private:
|
||||
inline void scanChar();
|
||||
int scanToken();
|
||||
int scanNumber(QChar ch);
|
||||
|
||||
bool isLineTerminator() const;
|
||||
static bool isIdentLetter(QChar c);
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
|
||||
#include "qmljsglobal_p.h"
|
||||
|
||||
#include <qglobal.h>
|
||||
#include <qshareddata.h>
|
||||
#include <qdebug.h>
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtCore/qshareddata.h>
|
||||
#include <QtCore/qdebug.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@@ -73,10 +73,10 @@ public:
|
||||
if (_blocks) {
|
||||
for (int i = 0; i < _allocatedBlocks; ++i) {
|
||||
if (char *b = _blocks[i])
|
||||
qFree(b);
|
||||
free(b);
|
||||
}
|
||||
|
||||
qFree(_blocks);
|
||||
free(_blocks);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ private:
|
||||
else
|
||||
_allocatedBlocks *= 2;
|
||||
|
||||
_blocks = (char **) qRealloc(_blocks, sizeof(char *) * _allocatedBlocks);
|
||||
_blocks = (char **) realloc(_blocks, sizeof(char *) * _allocatedBlocks);
|
||||
|
||||
for (int index = _blockCount; index < _allocatedBlocks; ++index)
|
||||
_blocks[index] = 0;
|
||||
@@ -117,7 +117,7 @@ private:
|
||||
char *&block = _blocks[_blockCount];
|
||||
|
||||
if (! block)
|
||||
block = (char *) qMalloc(BLOCK_SIZE);
|
||||
block = (char *) malloc(BLOCK_SIZE);
|
||||
|
||||
_ptr = block;
|
||||
_end = _ptr + BLOCK_SIZE;
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include <QtDebug>
|
||||
#include <QCoreApplication>
|
||||
#include <QtCore/QtDebug>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -59,10 +59,10 @@ void Parser::reallocateStack()
|
||||
else
|
||||
stack_size <<= 1;
|
||||
|
||||
sym_stack = reinterpret_cast<Value*> (qRealloc(sym_stack, stack_size * sizeof(Value)));
|
||||
state_stack = reinterpret_cast<int*> (qRealloc(state_stack, stack_size * sizeof(int)));
|
||||
location_stack = reinterpret_cast<AST::SourceLocation*> (qRealloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
|
||||
string_stack = reinterpret_cast<QStringRef*> (qRealloc(string_stack, stack_size * sizeof(QStringRef)));
|
||||
sym_stack = reinterpret_cast<Value*> (realloc(sym_stack, stack_size * sizeof(Value)));
|
||||
state_stack = reinterpret_cast<int*> (realloc(state_stack, stack_size * sizeof(int)));
|
||||
location_stack = reinterpret_cast<AST::SourceLocation*> (realloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
|
||||
string_stack = reinterpret_cast<QStringRef*> (realloc(string_stack, stack_size * sizeof(QStringRef)));
|
||||
}
|
||||
|
||||
Parser::Parser(Engine *engine):
|
||||
@@ -74,6 +74,7 @@ Parser::Parser(Engine *engine):
|
||||
state_stack(0),
|
||||
location_stack(0),
|
||||
string_stack(0),
|
||||
program(0),
|
||||
first_token(0),
|
||||
last_token(0)
|
||||
{
|
||||
@@ -82,10 +83,10 @@ Parser::Parser(Engine *engine):
|
||||
Parser::~Parser()
|
||||
{
|
||||
if (stack_size) {
|
||||
qFree(sym_stack);
|
||||
qFree(state_stack);
|
||||
qFree(location_stack);
|
||||
qFree(string_stack);
|
||||
free(sym_stack);
|
||||
free(state_stack);
|
||||
free(location_stack);
|
||||
free(string_stack);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
#include "qmljsast_p.h"
|
||||
#include "qmljsengine_p.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QString>
|
||||
|
||||
QT_QML_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ LibraryInfo::LibraryInfo(Status status)
|
||||
|
||||
LibraryInfo::LibraryInfo(const QmlDirParser &parser)
|
||||
: _status(Found)
|
||||
, _components(parser.components())
|
||||
, _components(parser.components().values())
|
||||
, _plugins(parser.plugins())
|
||||
, _typeinfos(parser.typeInfos())
|
||||
, _dumpStatus(NoTypeInfo)
|
||||
|
||||
@@ -928,6 +928,8 @@ static inline void formatMilliSeconds(std::wostream &str, int milliSecs)
|
||||
|
||||
static const char stdStringTypeC[] = "std::basic_string<char,std::char_traits<char>,std::allocator<char> >";
|
||||
static const char stdWStringTypeC[] = "std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> >";
|
||||
// Compiler option: -Zc:wchar_t-:
|
||||
static const char stdWStringWCharTypeC[] = "std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >";
|
||||
|
||||
static KnownType knownPODTypeHelper(const std::string &type, std::string::size_type endPos)
|
||||
{
|
||||
@@ -1028,7 +1030,8 @@ static KnownType knownClassTypeHelper(const std::string &type,
|
||||
// STL strings
|
||||
if (!type.compare(pos, endPos - pos, stdStringTypeC))
|
||||
return KT_StdString;
|
||||
if (!type.compare(pos, endPos - pos, stdWStringTypeC))
|
||||
if (!type.compare(pos, endPos - pos, stdWStringTypeC)
|
||||
|| !type.compare(pos, endPos - pos, stdWStringWCharTypeC))
|
||||
return KT_StdWString;
|
||||
return KT_Unknown;
|
||||
} // std::sth
|
||||
|
||||
@@ -596,7 +596,7 @@ void SftpChannelPrivate::handleGetStatus(const JobMap::Iterator &it,
|
||||
case SftpDownload::Open:
|
||||
if (op->statRequested) {
|
||||
reportRequestError(op, errorMessage(response.errorString,
|
||||
tr("Failed retrieve information on the remote file ('stat' failed).")));
|
||||
tr("Failed to retrieve information on the remote file ('stat' failed).")));
|
||||
sendTransferCloseHandle(op, response.requestId);
|
||||
} else {
|
||||
if ((response.status != SSH_FX_EOF || response.requestId != op->eofId)
|
||||
|
||||
@@ -243,8 +243,8 @@ ElfReader::Result ElfReader::readIt()
|
||||
QTC_CHECK(data == mapper.ustart + (is64Bit ? 64 : 52));
|
||||
|
||||
if (quint64(e_shnum) * e_shentsize > fdlen) {
|
||||
const QString reason = tr("announced %1 sections, each %2 bytes, exceed file size")
|
||||
.arg(e_shnum).arg(e_shentsize);
|
||||
const QString reason = tr("announced %n sections, each %1 bytes, exceed file size", 0, e_shnum)
|
||||
.arg(e_shentsize);
|
||||
m_errorString = msgInvalidElfObject(m_binary, reason);
|
||||
return Corrupt;
|
||||
}
|
||||
|
||||
@@ -1951,8 +1951,9 @@ void MainConnection::handleEvents()
|
||||
QString browsersNames = (m_browsers.isEmpty() ? QString() : m_browsers.at(0)->serviceType)
|
||||
+ ((m_browsers.count() > 1) ? QString::fromLatin1(",...") : QString());
|
||||
if (isOk())
|
||||
appendError(ErrorMessage::FailureLevel, tr("Zeroconf for [%1] accumulated %2 consecutive errors, aborting.")
|
||||
.arg(browsersNames).arg(m_nErrs));
|
||||
appendError(ErrorMessage::FailureLevel,
|
||||
tr("Zeroconf for [%1] accumulated %n consecutive errors, aborting.", 0, m_nErrs)
|
||||
.arg(browsersNames));
|
||||
}
|
||||
increaseStatusTo(Stopped);
|
||||
}
|
||||
|
||||
@@ -438,9 +438,9 @@ bool AndroidConfigurations::createAVD(int minApiLevel) const
|
||||
QStringListModel model(sdkTargets(minApiLevel));
|
||||
avdDialog.targetComboBox->setModel(&model);
|
||||
if (!model.rowCount()) {
|
||||
QMessageBox::critical(0, tr("Create AVD Error"),
|
||||
tr("Cannot create a new AVD, not enough android SDKs available\n"
|
||||
"Please install one SDK with api version >=%1").
|
||||
QMessageBox::critical(0, tr("Error Creating AVD"),
|
||||
tr("Cannot create a new AVD, no sufficiently recent Android SDK available.\n"
|
||||
"Please install an SDK of at least API version %1.").
|
||||
arg(minApiLevel));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -250,12 +250,12 @@ bool AndroidDeployStep::deployPackage()
|
||||
SLOT(handleBuildError()));
|
||||
|
||||
if (m_runDeployAction == DeployLocal) {
|
||||
writeOutput(tr("Clean old Qt libs"));
|
||||
writeOutput(tr("Clean old Qt libraries"));
|
||||
runCommand(deployProc, AndroidConfigurations::instance().adbToolPath().toString(),
|
||||
QStringList() << QLatin1String("-s") << m_deviceSerialNumber
|
||||
<< QLatin1String("shell") << QLatin1String("rm") << QLatin1String("-r") << QLatin1String("/data/local/qt"));
|
||||
|
||||
writeOutput(tr("Deploy Qt libs ... this may take some time, please wait"));
|
||||
writeOutput(tr("Deploy Qt libraries ... this may take some time, please wait"));
|
||||
const QString tempPath = QDir::tempPath() + QLatin1String("/android_qt_libs_") + m_packageName;
|
||||
AndroidPackageCreationStep::removeDirectory(tempPath);
|
||||
QStringList stripFiles;
|
||||
@@ -279,7 +279,7 @@ bool AndroidDeployStep::deployPackage()
|
||||
if (!runCommand(deployProc, AndroidConfigurations::instance().adbToolPath().toString(),
|
||||
QStringList() << QLatin1String("-s") << m_deviceSerialNumber
|
||||
<< QLatin1String("install") << QLatin1String("-r ") << m_runQASIPackagePath)) {
|
||||
raiseError(tr("Qt Android smart installer instalation failed"));
|
||||
raiseError(tr("Qt Android smart installer installation failed"));
|
||||
disconnect(deployProc, 0, this, 0);
|
||||
deployProc->deleteLater();
|
||||
return false;
|
||||
@@ -299,7 +299,7 @@ bool AndroidDeployStep::deployPackage()
|
||||
|
||||
if (!runCommand(deployProc, AndroidConfigurations::instance().adbToolPath().toString(),
|
||||
QStringList() << QLatin1String("-s") << m_deviceSerialNumber << QLatin1String("install") << package)) {
|
||||
raiseError(tr("Package instalation failed"));
|
||||
raiseError(tr("Package installation failed"));
|
||||
disconnect(deployProc, 0, this, 0);
|
||||
deployProc->deleteLater();
|
||||
return false;
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="devicesQtLibs">
|
||||
<property name="toolTip">
|
||||
<string>Use devices qt libs</string>
|
||||
<string>Use Qt libraries from device</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use device's Qt libs</string>
|
||||
<string>Use Qt libraries from device</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
@@ -38,21 +38,21 @@
|
||||
<item>
|
||||
<widget class="QRadioButton" name="deployQtLibs">
|
||||
<property name="toolTip">
|
||||
<string>Push local qt libs to device.
|
||||
You must have Qt libs compiled for that platform</string>
|
||||
<string>Push local Qt libraries to device.
|
||||
You must have Qt libraries compiled for that platform</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Deploy local Qt libs</string>
|
||||
<string>Deploy local Qt libraries</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="useLocalQtLibs">
|
||||
<property name="toolTip">
|
||||
<string>Check this option to force the application to use local qt libs instead of system libs.</string>
|
||||
<string>Check this option to force the application to use local Qt libraries instead of system libraries.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use local Qt libs</string>
|
||||
<string>Use local Qt libraries</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -70,7 +70,7 @@ You must have Qt libs compiled for that platform</string>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="installQASI">
|
||||
<property name="toolTip">
|
||||
<string>Choose and install Ministro system wide qt shared libraries.
|
||||
<string>Choose and install Ministro system wide Qt shared libraries.
|
||||
This option is useful when you want to try your application on devices which don't have Android Market (e.g. Android Emulator).</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
||||
@@ -142,7 +142,7 @@ bool AndroidPackageCreationStep::init()
|
||||
{
|
||||
const Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration());
|
||||
if (!bc) {
|
||||
raiseError(tr("Cannot create android package: current build configuration is not Qt4."));
|
||||
raiseError(tr("Cannot create Android package: current build configuration is not Qt 4."));
|
||||
return false;
|
||||
}
|
||||
Qt4Project *project = static_cast<Qt4Project *>(target()->project());
|
||||
@@ -188,15 +188,24 @@ BuildStepConfigWidget *AndroidPackageCreationStep::createConfigWidget()
|
||||
return new AndroidPackageCreationWidget(this);
|
||||
}
|
||||
|
||||
static inline QString msgCannotFindElfInformation()
|
||||
{
|
||||
return AndroidPackageCreationStep::tr("Cannot find ELF information");
|
||||
}
|
||||
|
||||
static inline QString msgCannotFindExecutable(const QString &appPath)
|
||||
{
|
||||
return AndroidPackageCreationStep::tr("Cannot find '%1'.\n"
|
||||
"Please make sure your application is "
|
||||
"built successfully and is selected in Application tab ('Run option').").arg(appPath);
|
||||
}
|
||||
|
||||
void AndroidPackageCreationStep::checkRequiredLibraries()
|
||||
{
|
||||
QProcess readelfProc;
|
||||
QString appPath = AndroidManager::targetApplicationPath(target());
|
||||
if (!QFile::exists(appPath)) {
|
||||
raiseError(tr("Cannot find read elf information"),
|
||||
tr("Cannot find '%1'.\n"
|
||||
"Please make sure your application is "
|
||||
"built successfully and is selected in Application tab ('Run option') ").arg(appPath));
|
||||
raiseError(msgCannotFindElfInformation(), msgCannotFindExecutable(appPath));
|
||||
return;
|
||||
}
|
||||
readelfProc.start(AndroidConfigurations::instance().readelfPath(target()->activeRunConfiguration()->abi().architecture()).toString(),
|
||||
@@ -244,10 +253,7 @@ void AndroidPackageCreationStep::checkRequiredLibrariesForRun()
|
||||
{
|
||||
QProcess readelfProc;
|
||||
if (!m_appPath.toFileInfo().exists()) {
|
||||
raiseError(tr("Can't find read elf information"),
|
||||
tr("Can't find '%1'.\n"
|
||||
"Please make sure your application is "
|
||||
"built successfully and is selected in Application tab ('Run option') ").arg(m_appPath.toUserOutput()));
|
||||
raiseError(msgCannotFindElfInformation(), msgCannotFindExecutable(m_appPath.toUserOutput()));
|
||||
return;
|
||||
}
|
||||
readelfProc.start(m_readElf.toString(), QStringList() << QLatin1String("-d") << QLatin1String("-W") << m_appPath.toUserOutput());
|
||||
|
||||
@@ -36,14 +36,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="editDebianFileLabel_4">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||
<tr>
|
||||
<td style="border: none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Android target SDK:</span></p></td></tr></table></body></html></string>
|
||||
<string><b>Android target SDK:</b></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -53,14 +46,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="editDebianFileLabel_2">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<table style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||
<tr>
|
||||
<td style="border: none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Package name:</span></p></td></tr></table></body></html></string>
|
||||
<string><b>Package name:</b></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -99,14 +85,7 @@ p, li { white-space: pre-wrap; }
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:600; font-style:normal;">
|
||||
<table style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||
<tr>
|
||||
<td style="border: none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version code:</p></td></tr></table></body></html></string>
|
||||
<string><b>Version code:</b></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -141,14 +120,7 @@ p, li { white-space: pre-wrap; }
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:600; font-style:normal;">
|
||||
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||
<tr>
|
||||
<td style="border: none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version name:</p></td></tr></table></body></html></string>
|
||||
<string><b>Version name:</b></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -169,14 +141,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="editDebianFileLabel_3">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||
<tr>
|
||||
<td style="border: none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Application name:</span></p></td></tr></table></body></html></string>
|
||||
<string><b>Application name:</b></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -186,14 +151,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="editDebianFileLabel_5">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||
<tr>
|
||||
<td style="border: none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Run:</span></p></td></tr></table></body></html></string>
|
||||
<string><b>Run:</b></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::AutoText</enum>
|
||||
@@ -212,14 +170,7 @@ p, li { white-space: pre-wrap; }
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<table style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||
<tr>
|
||||
<td style="border: none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Application icon:</span></p></td></tr></table></body></html></string>
|
||||
<string><b>Application icon:</b></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -425,592 +376,592 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.ACCESS_CHECKIN_PROPERTIES</string>
|
||||
<string notr="true">android.permission.ACCESS_CHECKIN_PROPERTIES</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.ACCESS_COARSE_LOCATION</string>
|
||||
<string notr="true">android.permission.ACCESS_COARSE_LOCATION</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.ACCESS_FINE_LOCATION</string>
|
||||
<string notr="true">android.permission.ACCESS_FINE_LOCATION</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.ACCESS_LOCATION_EXTRA_COMMANDS</string>
|
||||
<string notr="true">android.permission.ACCESS_LOCATION_EXTRA_COMMANDS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.ACCESS_MOCK_LOCATION</string>
|
||||
<string notr="true">android.permission.ACCESS_MOCK_LOCATION</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.ACCESS_NETWORK_STATE</string>
|
||||
<string notr="true">android.permission.ACCESS_NETWORK_STATE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.ACCESS_SURFACE_FLINGER</string>
|
||||
<string notr="true">android.permission.ACCESS_SURFACE_FLINGER</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.ACCESS_WIFI_STATE</string>
|
||||
<string notr="true">android.permission.ACCESS_WIFI_STATE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.ACCOUNT_MANAGER</string>
|
||||
<string notr="true">android.permission.ACCOUNT_MANAGER</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.AUTHENTICATE_ACCOUNTS</string>
|
||||
<string notr="true">android.permission.AUTHENTICATE_ACCOUNTS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BATTERY_STATS</string>
|
||||
<string notr="true">android.permission.BATTERY_STATS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BIND_APPWIDGET</string>
|
||||
<string notr="true">android.permission.BIND_APPWIDGET</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BIND_DEVICE_ADMIN</string>
|
||||
<string notr="true">android.permission.BIND_DEVICE_ADMIN</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BIND_INPUT_METHOD</string>
|
||||
<string notr="true">android.permission.BIND_INPUT_METHOD</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BIND_REMOTEVIEWS</string>
|
||||
<string notr="true">android.permission.BIND_REMOTEVIEWS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BIND_WALLPAPER</string>
|
||||
<string notr="true">android.permission.BIND_WALLPAPER</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BLUETOOTH</string>
|
||||
<string notr="true">android.permission.BLUETOOTH</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BLUETOOTH_ADMIN</string>
|
||||
<string notr="true">android.permission.BLUETOOTH_ADMIN</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BRICK</string>
|
||||
<string notr="true">android.permission.BRICK</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BROADCAST_PACKAGE_REMOVED</string>
|
||||
<string notr="true">android.permission.BROADCAST_PACKAGE_REMOVED</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BROADCAST_SMS</string>
|
||||
<string notr="true">android.permission.BROADCAST_SMS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BROADCAST_STICKY</string>
|
||||
<string notr="true">android.permission.BROADCAST_STICKY</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.BROADCAST_WAP_PUSH</string>
|
||||
<string notr="true">android.permission.BROADCAST_WAP_PUSH</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.CALL_PHONE</string>
|
||||
<string notr="true">android.permission.CALL_PHONE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.CALL_PRIVILEGED</string>
|
||||
<string notr="true">android.permission.CALL_PRIVILEGED</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.CAMERA</string>
|
||||
<string notr="true">android.permission.CAMERA</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.CHANGE_COMPONENT_ENABLED_STATE</string>
|
||||
<string notr="true">android.permission.CHANGE_COMPONENT_ENABLED_STATE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.CHANGE_CONFIGURATION</string>
|
||||
<string notr="true">android.permission.CHANGE_CONFIGURATION</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.CHANGE_NETWORK_STATE</string>
|
||||
<string notr="true">android.permission.CHANGE_NETWORK_STATE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.CHANGE_WIFI_MULTICAST_STATE</string>
|
||||
<string notr="true">android.permission.CHANGE_WIFI_MULTICAST_STATE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.CHANGE_WIFI_STATE</string>
|
||||
<string notr="true">android.permission.CHANGE_WIFI_STATE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.CLEAR_APP_CACHE</string>
|
||||
<string notr="true">android.permission.CLEAR_APP_CACHE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.CLEAR_APP_USER_DATA</string>
|
||||
<string notr="true">android.permission.CLEAR_APP_USER_DATA</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.CONTROL_LOCATION_UPDATES</string>
|
||||
<string notr="true">android.permission.CONTROL_LOCATION_UPDATES</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.DELETE_CACHE_FILES</string>
|
||||
<string notr="true">android.permission.DELETE_CACHE_FILES</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.DELETE_PACKAGES</string>
|
||||
<string notr="true">android.permission.DELETE_PACKAGES</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.DEVICE_POWER</string>
|
||||
<string notr="true">android.permission.DEVICE_POWER</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.DIAGNOSTIC</string>
|
||||
<string notr="true">android.permission.DIAGNOSTIC</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.DISABLE_KEYGUARD</string>
|
||||
<string notr="true">android.permission.DISABLE_KEYGUARD</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.DUMP</string>
|
||||
<string notr="true">android.permission.DUMP</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.EXPAND_STATUS_BAR</string>
|
||||
<string notr="true">android.permission.EXPAND_STATUS_BAR</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.FACTORY_TEST</string>
|
||||
<string notr="true">android.permission.FACTORY_TEST</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.FLASHLIGHT</string>
|
||||
<string notr="true">android.permission.FLASHLIGHT</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.FORCE_BACK</string>
|
||||
<string notr="true">android.permission.FORCE_BACK</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.GET_ACCOUNTS</string>
|
||||
<string notr="true">android.permission.GET_ACCOUNTS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.GET_PACKAGE_SIZE</string>
|
||||
<string notr="true">android.permission.GET_PACKAGE_SIZE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.GET_TASKS</string>
|
||||
<string notr="true">android.permission.GET_TASKS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.GLOBAL_SEARCH</string>
|
||||
<string notr="true">android.permission.GLOBAL_SEARCH</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.HARDWARE_TEST</string>
|
||||
<string notr="true">android.permission.HARDWARE_TEST</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.INJECT_EVENTS</string>
|
||||
<string notr="true">android.permission.INJECT_EVENTS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.INSTALL_LOCATION_PROVIDER</string>
|
||||
<string notr="true">android.permission.INSTALL_LOCATION_PROVIDER</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.INSTALL_PACKAGES</string>
|
||||
<string notr="true">android.permission.INSTALL_PACKAGES</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.INTERNAL_SYSTEM_WINDOW</string>
|
||||
<string notr="true">android.permission.INTERNAL_SYSTEM_WINDOW</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.INTERNET</string>
|
||||
<string notr="true">android.permission.INTERNET</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.KILL_BACKGROUND_PROCESSES</string>
|
||||
<string notr="true">android.permission.KILL_BACKGROUND_PROCESSES</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.MANAGE_ACCOUNTS</string>
|
||||
<string notr="true">android.permission.MANAGE_ACCOUNTS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.MANAGE_APP_TOKENS</string>
|
||||
<string notr="true">android.permission.MANAGE_APP_TOKENS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.MASTER_CLEAR</string>
|
||||
<string notr="true">android.permission.MASTER_CLEAR</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.MODIFY_AUDIO_SETTINGS</string>
|
||||
<string notr="true">android.permission.MODIFY_AUDIO_SETTINGS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.MODIFY_PHONE_STATE</string>
|
||||
<string notr="true">android.permission.MODIFY_PHONE_STATE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.MOUNT_FORMAT_FILESYSTEMS</string>
|
||||
<string notr="true">android.permission.MOUNT_FORMAT_FILESYSTEMS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.MOUNT_UNMOUNT_FILESYSTEMS</string>
|
||||
<string notr="true">android.permission.MOUNT_UNMOUNT_FILESYSTEMS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.NFC</string>
|
||||
<string notr="true">android.permission.NFC</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.PERSISTENT_ACTIVITY</string>
|
||||
<string notr="true">android.permission.PERSISTENT_ACTIVITY</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.PROCESS_OUTGOING_CALLS</string>
|
||||
<string notr="true">android.permission.PROCESS_OUTGOING_CALLS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.READ_CALENDAR</string>
|
||||
<string notr="true">android.permission.READ_CALENDAR</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.READ_CONTACTS</string>
|
||||
<string notr="true">android.permission.READ_CONTACTS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.READ_FRAME_BUFFER</string>
|
||||
<string notr="true">android.permission.READ_FRAME_BUFFER</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>com.android.browser.permission.READ_HISTORY_BOOKMARKS</string>
|
||||
<string notr="true">com.android.browser.permission.READ_HISTORY_BOOKMARKS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.READ_INPUT_STATE</string>
|
||||
<string notr="true">android.permission.READ_INPUT_STATE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.READ_LOGS</string>
|
||||
<string notr="true">android.permission.READ_LOGS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.READ_OWNER_DATA</string>
|
||||
<string notr="true">android.permission.READ_OWNER_DATA</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.READ_PHONE_STATE</string>
|
||||
<string notr="true">android.permission.READ_PHONE_STATE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.READ_SMS</string>
|
||||
<string notr="true">android.permission.READ_SMS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.READ_SYNC_SETTINGS</string>
|
||||
<string notr="true">android.permission.READ_SYNC_SETTINGS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.READ_SYNC_STATS</string>
|
||||
<string notr="true">android.permission.READ_SYNC_STATS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.REBOOT</string>
|
||||
<string notr="true">android.permission.REBOOT</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.RECEIVE_BOOT_COMPLETED</string>
|
||||
<string notr="true">android.permission.RECEIVE_BOOT_COMPLETED</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.RECEIVE_MMS</string>
|
||||
<string notr="true">android.permission.RECEIVE_MMS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.RECEIVE_SMS</string>
|
||||
<string notr="true">android.permission.RECEIVE_SMS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.RECEIVE_WAP_PUSH</string>
|
||||
<string notr="true">android.permission.RECEIVE_WAP_PUSH</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.RECORD_AUDIO</string>
|
||||
<string notr="true">android.permission.RECORD_AUDIO</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.REORDER_TASKS</string>
|
||||
<string notr="true">android.permission.REORDER_TASKS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.RESTART_PACKAGES</string>
|
||||
<string notr="true">android.permission.RESTART_PACKAGES</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SEND_SMS</string>
|
||||
<string notr="true">android.permission.SEND_SMS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SET_ACTIVITY_WATCHER</string>
|
||||
<string notr="true">android.permission.SET_ACTIVITY_WATCHER</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>com.android.alarm.permission.SET_ALARM</string>
|
||||
<string notr="true">com.android.alarm.permission.SET_ALARM</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SET_ALWAYS_FINISH</string>
|
||||
<string notr="true">android.permission.SET_ALWAYS_FINISH</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SET_ANIMATION_SCALE</string>
|
||||
<string notr="true">android.permission.SET_ANIMATION_SCALE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SET_DEBUG_APP</string>
|
||||
<string notr="true">android.permission.SET_DEBUG_APP</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SET_ORIENTATION</string>
|
||||
<string notr="true">android.permission.SET_ORIENTATION</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SET_PREFERRED_APPLICATIONS</string>
|
||||
<string notr="true">android.permission.SET_PREFERRED_APPLICATIONS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SET_PROCESS_LIMIT</string>
|
||||
<string notr="true">android.permission.SET_PROCESS_LIMIT</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SET_TIME</string>
|
||||
<string notr="true">android.permission.SET_TIME</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SET_TIME_ZONE</string>
|
||||
<string notr="true">android.permission.SET_TIME_ZONE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SET_WALLPAPER</string>
|
||||
<string notr="true">android.permission.SET_WALLPAPER</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SET_WALLPAPER_HINTS</string>
|
||||
<string notr="true">android.permission.SET_WALLPAPER_HINTS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SIGNAL_PERSISTENT_PROCESSES</string>
|
||||
<string notr="true">android.permission.SIGNAL_PERSISTENT_PROCESSES</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.STATUS_BAR</string>
|
||||
<string notr="true">android.permission.STATUS_BAR</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SUBSCRIBED_FEEDS_READ</string>
|
||||
<string notr="true">android.permission.SUBSCRIBED_FEEDS_READ</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SUBSCRIBED_FEEDS_WRITE</string>
|
||||
<string notr="true">android.permission.SUBSCRIBED_FEEDS_WRITE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.SYSTEM_ALERT_WINDOW</string>
|
||||
<string notr="true">android.permission.SYSTEM_ALERT_WINDOW</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.UPDATE_DEVICE_STATS</string>
|
||||
<string notr="true">android.permission.UPDATE_DEVICE_STATS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.USE_CREDENTIALS</string>
|
||||
<string notr="true">android.permission.USE_CREDENTIALS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.USE_SIP</string>
|
||||
<string notr="true">android.permission.USE_SIP</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.VIBRATE</string>
|
||||
<string notr="true">android.permission.VIBRATE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.WAKE_LOCK</string>
|
||||
<string notr="true">android.permission.WAKE_LOCK</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.WRITE_APN_SETTINGS</string>
|
||||
<string notr="true">android.permission.WRITE_APN_SETTINGS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.WRITE_CALENDAR</string>
|
||||
<string notr="true">android.permission.WRITE_CALENDAR</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.WRITE_CONTACTS</string>
|
||||
<string notr="true">android.permission.WRITE_CONTACTS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.WRITE_EXTERNAL_STORAGE</string>
|
||||
<string notr="true">android.permission.WRITE_EXTERNAL_STORAGE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.WRITE_GSERVICES</string>
|
||||
<string notr="true">android.permission.WRITE_GSERVICES</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>com.android.browser.permission.WRITE_HISTORY_BOOKMARKS</string>
|
||||
<string notr="true">com.android.browser.permission.WRITE_HISTORY_BOOKMARKS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.WRITE_OWNER_DATA</string>
|
||||
<string notr="true">android.permission.WRITE_OWNER_DATA</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.WRITE_SECURE_SETTINGS</string>
|
||||
<string notr="true">android.permission.WRITE_SECURE_SETTINGS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.WRITE_SETTINGS</string>
|
||||
<string notr="true">android.permission.WRITE_SETTINGS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.WRITE_SMS</string>
|
||||
<string notr="true">android.permission.WRITE_SMS</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>android.permission.WRITE_SYNC_SETTINGS</string>
|
||||
<string notr="true">android.permission.WRITE_SYNC_SETTINGS</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
|
||||
@@ -88,7 +88,8 @@ QList<ProjectExplorer::Abi> AndroidQtVersion::detectQtAbis() const
|
||||
|
||||
QString AndroidQtVersion::description() const
|
||||
{
|
||||
return tr("Android::Internal::AndroidQtVersion", "Qt Version is meant for Android");
|
||||
//: Qt Version is meant for Android
|
||||
return tr("Android");
|
||||
}
|
||||
|
||||
Core::FeatureSet AndroidQtVersion::availableFeatures() const
|
||||
|
||||
@@ -196,7 +196,7 @@ void AndroidRunner::asyncStart()
|
||||
|
||||
adbStarProc.start(AndroidConfigurations::instance().adbToolPath().toString(), arguments);
|
||||
if (!adbStarProc.waitForStarted()) {
|
||||
emit remoteProcessFinished(tr("Failed to start the activity. Reason: $1").arg(adbStarProc.errorString()));
|
||||
emit remoteProcessFinished(tr("Failed to start the activity. Reason: %1").arg(adbStarProc.errorString()));
|
||||
return;
|
||||
}
|
||||
if (!adbStarProc.waitForFinished(-1)) {
|
||||
|
||||
@@ -78,6 +78,7 @@ QVariant AVDModel::headerData(int section, Qt::Orientation orientation, int role
|
||||
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
|
||||
switch (section) {
|
||||
case 0:
|
||||
//: AVD - Android Virtual Device
|
||||
return tr("AVD Name");
|
||||
case 1:
|
||||
return tr("AVD Target");
|
||||
@@ -356,7 +357,7 @@ void AndroidSettingsWidget::browseAntLocation()
|
||||
void AndroidSettingsWidget::browseGdbLocation()
|
||||
{
|
||||
Utils::FileName gdbPath = AndroidConfigurations::instance().gdbPath(ProjectExplorer::Abi::ArmArchitecture);
|
||||
Utils::FileName file = Utils::FileName::fromString(QFileDialog::getOpenFileName(this, tr("Select gdb executable"), gdbPath.toString()));
|
||||
Utils::FileName file = Utils::FileName::fromString(QFileDialog::getOpenFileName(this, tr("Select GDB Executable"), gdbPath.toString()));
|
||||
if (file.isEmpty())
|
||||
return;
|
||||
m_ui->GdbLocationLineEdit->setText(file.toUserOutput());
|
||||
@@ -366,7 +367,7 @@ void AndroidSettingsWidget::browseGdbLocation()
|
||||
void AndroidSettingsWidget::browseGdbserverLocation()
|
||||
{
|
||||
Utils::FileName gdbserverPath = AndroidConfigurations::instance().gdbServerPath(ProjectExplorer::Abi::ArmArchitecture);
|
||||
Utils::FileName file = Utils::FileName::fromString(QFileDialog::getOpenFileName(this, tr("Select gdbserver android executable"), gdbserverPath.toString()));
|
||||
Utils::FileName file = Utils::FileName::fromString(QFileDialog::getOpenFileName(this, tr("Select GDB Server Android Executable"), gdbserverPath.toString()));
|
||||
if (file.isEmpty())
|
||||
return;
|
||||
m_ui->GdbserverLocationLineEdit->setText(file.toUserOutput());
|
||||
@@ -376,7 +377,7 @@ void AndroidSettingsWidget::browseGdbserverLocation()
|
||||
void AndroidSettingsWidget::browseGdbLocationX86()
|
||||
{
|
||||
Utils::FileName gdbPath = AndroidConfigurations::instance().gdbPath(ProjectExplorer::Abi::X86Architecture);
|
||||
Utils::FileName file = Utils::FileName::fromString(QFileDialog::getOpenFileName(this, tr("Select gdb executable"), gdbPath.toString()));
|
||||
Utils::FileName file = Utils::FileName::fromString(QFileDialog::getOpenFileName(this, tr("Select GDB Executable"), gdbPath.toString()));
|
||||
if (file.isEmpty())
|
||||
return;
|
||||
m_ui->GdbLocationLineEditx86->setText(file.toUserOutput());
|
||||
@@ -386,7 +387,7 @@ void AndroidSettingsWidget::browseGdbLocationX86()
|
||||
void AndroidSettingsWidget::browseGdbserverLocationX86()
|
||||
{
|
||||
Utils::FileName gdbserverPath = AndroidConfigurations::instance().gdbServerPath(ProjectExplorer::Abi::X86Architecture);
|
||||
Utils::FileName file = Utils::FileName::fromString(QFileDialog::getOpenFileName(this, tr("Select gdbserver android executable"), gdbserverPath.toString()));
|
||||
Utils::FileName file = Utils::FileName::fromString(QFileDialog::getOpenFileName(this, tr("Select GDB Server Android Executable"), gdbserverPath.toString()));
|
||||
if (file.isEmpty())
|
||||
return;
|
||||
m_ui->GdbserverLocationLineEditx86->setText(file.toUserOutput());
|
||||
@@ -396,7 +397,7 @@ void AndroidSettingsWidget::browseGdbserverLocationX86()
|
||||
void AndroidSettingsWidget::browseOpenJDKLocation()
|
||||
{
|
||||
Utils::FileName openJDKPath = AndroidConfigurations::instance().openJDKPath();
|
||||
Utils::FileName file = Utils::FileName::fromString(QFileDialog::getOpenFileName(this, tr("Select OpenJDK path"), openJDKPath.toString()));
|
||||
Utils::FileName file = Utils::FileName::fromString(QFileDialog::getOpenFileName(this, tr("Select OpenJDK Path"), openJDKPath.toString()));
|
||||
if (file.isEmpty())
|
||||
return;
|
||||
m_ui->OpenJDKLocationLineEdit->setText(file.toUserOutput());
|
||||
|
||||
@@ -178,7 +178,7 @@ void AndroidToolChain::setQtVersionId(int id)
|
||||
setTargetAbi(version->qtAbis().at(0));
|
||||
|
||||
toolChainUpdated();
|
||||
setDisplayName(AndroidToolChainFactory::tr("Android Gcc for %1").arg(version->displayName()));
|
||||
setDisplayName(AndroidToolChainFactory::tr("Android GCC for %1").arg(version->displayName()));
|
||||
}
|
||||
|
||||
int AndroidToolChain::qtVersionId() const
|
||||
|
||||
@@ -73,11 +73,6 @@ Core::IEditor *CMakeEditor::duplicate(QWidget *parent)
|
||||
return ret->editor();
|
||||
}
|
||||
|
||||
Core::Context CMakeEditor::context() const
|
||||
{
|
||||
return Core::Context(Constants::C_CMAKEEDITOR);
|
||||
}
|
||||
|
||||
Core::Id CMakeEditor::id() const
|
||||
{
|
||||
return CMakeProjectManager::Constants::CMAKE_EDITOR_ID;
|
||||
|
||||
@@ -58,7 +58,6 @@ public:
|
||||
|
||||
bool duplicateSupported() const { return true; }
|
||||
Core::IEditor *duplicate(QWidget *parent);
|
||||
Core::Context context() const;
|
||||
Core::Id id() const;
|
||||
bool isTemporary() const { return false; }
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CMakeProjectManager {
|
||||
namespace Constants {
|
||||
|
||||
const char PROJECTCONTEXT[] = "CMakeProject.ProjectContext";
|
||||
const char CMAKEMIMETYPE[] = "text/x-cmake"; // TODO check that this is correct
|
||||
const char CMAKEMIMETYPE[] = "text/x-cmake";
|
||||
const char CMAKE_EDITOR_ID[] = "CMakeProject.CMakeEditor";
|
||||
const char CMAKE_EDITOR_DISPLAY_NAME[] = "CMake Editor";
|
||||
const char C_CMAKEEDITOR[] = "CMakeProject.Context.CMakeEditor";
|
||||
|
||||
@@ -4,9 +4,13 @@ DEFINES += CORE_LIBRARY
|
||||
QT += network \
|
||||
script \
|
||||
sql
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
QT += help printsupport
|
||||
} else {
|
||||
CONFIG += help
|
||||
}
|
||||
|
||||
include(../../qtcreatorplugin.pri)
|
||||
include(../../libs/utils/utils.pri)
|
||||
include(../../shared/scriptwrapper/scriptwrapper.pri)
|
||||
|
||||
@@ -75,7 +75,7 @@ class CORE_EXPORT IContext : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
IContext(QObject *parent = 0) : QObject(parent), m_widget(0) {}
|
||||
IContext(QObject *parent = 0) : QObject(parent) {}
|
||||
|
||||
virtual Context context() const { return m_context; }
|
||||
virtual QWidget *widget() const { return m_widget; }
|
||||
|
||||
@@ -192,6 +192,8 @@ QtcPlugin {
|
||||
"gdb/gdbengine.h",
|
||||
"gdb/gdboptionspage.cpp",
|
||||
"gdb/termgdbadapter.cpp",
|
||||
"gdb/startgdbserverdialog.cpp",
|
||||
"gdb/startgdbserverdialog.h",
|
||||
"images/breakpoint_16.png",
|
||||
"images/breakpoint_24.png",
|
||||
"images/breakpoint_disabled_16.png",
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
#include "snapshothandler.h"
|
||||
#include "threadshandler.h"
|
||||
#include "commonoptionspage.h"
|
||||
#include "gdb/startgdbserverdialog.h"
|
||||
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
@@ -1093,16 +1094,11 @@ public slots:
|
||||
unsigned *enabledEngines, QString *errorMessage);
|
||||
|
||||
DebuggerToolTipManager *toolTipManager() const { return m_toolTipManager; }
|
||||
virtual QSharedPointer<GlobalDebuggerOptions> globalDebuggerOptions() const { return m_globalDebuggerOptions; }
|
||||
QSharedPointer<GlobalDebuggerOptions> globalDebuggerOptions() const { return m_globalDebuggerOptions; }
|
||||
|
||||
// FIXME: Remove.
|
||||
void maybeEnrichParameters(DebuggerStartParameters *sp);
|
||||
|
||||
void gdbServerStarted(const QString &channel, const QString &profile,
|
||||
const QString &remoteCommandLine, const QString &remoteExecutable);
|
||||
void attachedToProcess(const QString &channel, const QString &profile,
|
||||
const QString &remoteCommandLine, const QString &remoteExecutable);
|
||||
|
||||
void updateQmlActions() {
|
||||
action(QmlUpdateOnSave)->setEnabled(boolSetting(ShowQmlObjectTree));
|
||||
}
|
||||
@@ -1671,88 +1667,14 @@ void DebuggerPluginPrivate::attachToRemoteServer()
|
||||
|
||||
void DebuggerPluginPrivate::startRemoteServer()
|
||||
{
|
||||
QObject *rl = PluginManager::getObjectByName(_("RemoteLinuxPlugin"));
|
||||
QTC_ASSERT(rl, return);
|
||||
QMetaObject::invokeMethod(rl, "startGdbServer", Qt::QueuedConnection);
|
||||
// Will call back gdbServerStarted() below.
|
||||
}
|
||||
|
||||
void DebuggerPluginPrivate::gdbServerStarted(const QString &channel,
|
||||
const QString &profileId,
|
||||
const QString &remoteCommandLine,
|
||||
const QString &remoteExecutable)
|
||||
{
|
||||
Q_UNUSED(remoteCommandLine);
|
||||
Q_UNUSED(remoteExecutable);
|
||||
Q_UNUSED(profileId);
|
||||
showStatusMessage(tr("gdbserver is now listening at %1").arg(channel));
|
||||
StartGdbServerDialog dlg(mainWindow());
|
||||
dlg.startGdbServer();
|
||||
}
|
||||
|
||||
void DebuggerPluginPrivate::attachToRemoteProcess()
|
||||
{
|
||||
QObject *rl = PluginManager::getObjectByName(_("RemoteLinuxPlugin"));
|
||||
QTC_ASSERT(rl, return);
|
||||
QMetaObject::invokeMethod(rl, "attachToRemoteProcess", Qt::QueuedConnection);
|
||||
// This will call back attachedToProcess() below.
|
||||
}
|
||||
|
||||
void DebuggerPluginPrivate::attachedToProcess(const QString &channel,
|
||||
const QString &profileId,
|
||||
const QString &remoteCommandLine,
|
||||
const QString &remoteExecutable)
|
||||
{
|
||||
Profile *profile = ProfileManager::instance()->find(Id(profileId));
|
||||
QTC_ASSERT(profile, return);
|
||||
QString sysroot = SysRootProfileInformation::sysRoot(profile).toString();
|
||||
QString binary;
|
||||
QString localExecutable;
|
||||
QString candidate = sysroot + remoteExecutable;
|
||||
if (QFileInfo(candidate).exists())
|
||||
localExecutable = candidate;
|
||||
if (localExecutable.isEmpty()) {
|
||||
binary = remoteCommandLine.section(QLatin1Char(' '), 0, 0);
|
||||
candidate = sysroot + QLatin1Char('/') + binary;
|
||||
if (QFileInfo(candidate).exists())
|
||||
localExecutable = candidate;
|
||||
}
|
||||
if (localExecutable.isEmpty()) {
|
||||
candidate = sysroot + QLatin1String("/usr/bin/") + binary;
|
||||
if (QFileInfo(candidate).exists())
|
||||
localExecutable = candidate;
|
||||
}
|
||||
if (localExecutable.isEmpty()) {
|
||||
candidate = sysroot + QLatin1String("/bin/") + binary;
|
||||
if (QFileInfo(candidate).exists())
|
||||
localExecutable = candidate;
|
||||
}
|
||||
if (localExecutable.isEmpty()) {
|
||||
QMessageBox::warning(mainWindow(), tr("Warning"),
|
||||
tr("Cannot find local executable for remote process \"%1\".")
|
||||
.arg(remoteCommandLine));
|
||||
return;
|
||||
}
|
||||
|
||||
QList<Abi> abis = Abi::abisOfBinary(Utils::FileName::fromString(localExecutable));
|
||||
if (abis.isEmpty()) {
|
||||
QMessageBox::warning(mainWindow(), tr("Warning"),
|
||||
tr("Cannot find ABI for remote process \"%1\".")
|
||||
.arg(remoteCommandLine));
|
||||
return;
|
||||
}
|
||||
|
||||
DebuggerStartParameters sp;
|
||||
fillParameters(&sp, Id(profileId));
|
||||
sp.displayName = tr("Remote: \"%1\"").arg(channel);
|
||||
sp.remoteChannel = channel;
|
||||
sp.executable = localExecutable;
|
||||
sp.startMode = AttachToRemoteServer;
|
||||
sp.closeMode = KillAtClose;
|
||||
sp.overrideStartScript.clear();
|
||||
sp.useServerStartScript = false;
|
||||
sp.serverStartScript.clear();
|
||||
//sp.debugInfoLocation = dlg.debugInfoLocation();
|
||||
if (RunControl *rc = createDebugger(sp))
|
||||
startDebugger(rc);
|
||||
StartGdbServerDialog dlg(mainWindow());
|
||||
dlg.attachToRemoteProcess();
|
||||
}
|
||||
|
||||
void DebuggerPluginPrivate::attachToQmlPort()
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
* version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
|
||||
@@ -13,6 +13,7 @@ HEADERS += \
|
||||
$$PWD/remotegdbprocess.h \
|
||||
$$PWD/remoteplaingdbadapter.h \
|
||||
$$PWD/abstractplaingdbadapter.h \
|
||||
$$PWD/startgdbserverdialog.h \
|
||||
$$PWD/symbian.h
|
||||
|
||||
SOURCES += \
|
||||
@@ -32,6 +33,7 @@ SOURCES += \
|
||||
$$PWD/remotegdbprocess.cpp \
|
||||
$$PWD/remoteplaingdbadapter.cpp \
|
||||
$$PWD/abstractplaingdbadapter.cpp \
|
||||
$$PWD/startgdbserverdialog.cpp \
|
||||
$$PWD/symbian.cpp
|
||||
|
||||
RESOURCES += $$PWD/gdb.qrc
|
||||
|
||||
@@ -30,18 +30,23 @@
|
||||
|
||||
#include "startgdbserverdialog.h"
|
||||
|
||||
#include "remotelinuxusedportsgatherer.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggermainwindow.h"
|
||||
#include "debuggerplugin.h"
|
||||
#include "debuggerprofileinformation.h"
|
||||
#include "debuggerrunner.h"
|
||||
#include "debuggerstartparameters.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <projectexplorer/profilechooser.h>
|
||||
#include <projectexplorer/profileinformation.h>
|
||||
#include <projectexplorer/devicesupport/deviceprocesslist.h>
|
||||
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||
#include <ssh/sshconnection.h>
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/portlist.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <ssh/sshconnection.h>
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
|
||||
#include <QVariant>
|
||||
#include <QSettings>
|
||||
@@ -70,12 +75,12 @@ using namespace ProjectExplorer;
|
||||
using namespace QSsh;
|
||||
using namespace Utils;
|
||||
|
||||
const char LastProfile[] = "RemoteLinux/LastProfile";
|
||||
const char LastDevice[] = "RemoteLinux/LastDevice";
|
||||
const char LastProcessName[] = "RemoteLinux/LastProcessName";
|
||||
//const char LastLocalExecutable[] = "RemoteLinux/LastLocalExecutable";
|
||||
const char LastProfile[] = "Debugger/LastProfile";
|
||||
const char LastDevice[] = "Debugger/LastDevice";
|
||||
const char LastProcessName[] = "Debugger/LastProcessName";
|
||||
//const char LastLocalExecutable[] = "Debugger/LastLocalExecutable";
|
||||
|
||||
namespace RemoteLinux {
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class StartGdbServerDialogPrivate
|
||||
@@ -101,9 +106,8 @@ public:
|
||||
QPushButton *closeButton;
|
||||
ProfileChooser *profileChooser;
|
||||
|
||||
RemoteLinuxUsedPortsGatherer gatherer;
|
||||
DeviceUsedPortsGatherer gatherer;
|
||||
SshRemoteProcessRunner runner;
|
||||
QSettings *settings;
|
||||
QString remoteCommandLine;
|
||||
QString remoteExecutable;
|
||||
};
|
||||
@@ -111,7 +115,7 @@ public:
|
||||
StartGdbServerDialogPrivate::StartGdbServerDialogPrivate(StartGdbServerDialog *q)
|
||||
: q(q), startServerOnly(true), processList(0)
|
||||
{
|
||||
settings = ICore::settings();
|
||||
QSettings *settings = ICore::settings();
|
||||
|
||||
profileChooser = new ProfileChooser(q, ProfileChooser::RemoteDebugging);
|
||||
|
||||
@@ -261,8 +265,9 @@ void StartGdbServerDialog::attachToProcess()
|
||||
return;
|
||||
}
|
||||
|
||||
d->settings->setValue(LastProfile, d->profileChooser->currentProfileId().toString());
|
||||
d->settings->setValue(LastProcessName, d->processFilterLineEdit->text());
|
||||
QSettings *settings = ICore::settings();
|
||||
settings->setValue(LastProfile, d->profileChooser->currentProfileId().toString());
|
||||
settings->setValue(LastProcessName, d->processFilterLineEdit->text());
|
||||
|
||||
startGdbServerOnPort(port, process.pid);
|
||||
}
|
||||
@@ -349,21 +354,73 @@ void StartGdbServerDialog::handleProcessErrorOutput()
|
||||
|
||||
void StartGdbServerDialog::reportOpenPort(int port)
|
||||
{
|
||||
close();
|
||||
logMessage(tr("Port %1 is now accessible.").arg(port));
|
||||
IDevice::ConstPtr device = d->currentDevice();
|
||||
QString channel = QString("%1:%2").arg(device->sshParameters().host).arg(port);
|
||||
logMessage(tr("Server started on %1").arg(channel));
|
||||
|
||||
const char *member = d->startServerOnly ? "gdbServerStarted" : "attachedToProcess";
|
||||
QObject *ob = ExtensionSystem::PluginManager::getObjectByName("DebuggerCore");
|
||||
if (ob) {
|
||||
QMetaObject::invokeMethod(ob, member, Qt::QueuedConnection,
|
||||
Q_ARG(QString, channel),
|
||||
Q_ARG(QString, d->profileChooser->currentProfileId().toString()),
|
||||
Q_ARG(QString, d->remoteCommandLine),
|
||||
Q_ARG(QString, d->remoteExecutable));
|
||||
const Profile *profile = d->profileChooser->currentProfile();
|
||||
QTC_ASSERT(profile, return);
|
||||
|
||||
if (d->startServerOnly) {
|
||||
//showStatusMessage(tr("gdbserver is now listening at %1").arg(channel));
|
||||
} else {
|
||||
QString sysroot = SysRootProfileInformation::sysRoot(profile).toString();
|
||||
QString binary;
|
||||
QString localExecutable;
|
||||
QString candidate = sysroot + d->remoteExecutable;
|
||||
if (QFileInfo(candidate).exists())
|
||||
localExecutable = candidate;
|
||||
if (localExecutable.isEmpty()) {
|
||||
binary = d->remoteCommandLine.section(QLatin1Char(' '), 0, 0);
|
||||
candidate = sysroot + QLatin1Char('/') + binary;
|
||||
if (QFileInfo(candidate).exists())
|
||||
localExecutable = candidate;
|
||||
}
|
||||
if (localExecutable.isEmpty()) {
|
||||
candidate = sysroot + QLatin1String("/usr/bin/") + binary;
|
||||
if (QFileInfo(candidate).exists())
|
||||
localExecutable = candidate;
|
||||
}
|
||||
if (localExecutable.isEmpty()) {
|
||||
candidate = sysroot + QLatin1String("/bin/") + binary;
|
||||
if (QFileInfo(candidate).exists())
|
||||
localExecutable = candidate;
|
||||
}
|
||||
if (localExecutable.isEmpty()) {
|
||||
QMessageBox::warning(DebuggerPlugin::mainWindow(), tr("Warning"),
|
||||
tr("Cannot find local executable for remote process \"%1\".")
|
||||
.arg(d->remoteCommandLine));
|
||||
return;
|
||||
}
|
||||
|
||||
QList<Abi> abis = Abi::abisOfBinary(Utils::FileName::fromString(localExecutable));
|
||||
if (abis.isEmpty()) {
|
||||
QMessageBox::warning(DebuggerPlugin::mainWindow(), tr("Warning"),
|
||||
tr("Cannot find ABI for remote process \"%1\".")
|
||||
.arg(d->remoteCommandLine));
|
||||
return;
|
||||
}
|
||||
|
||||
DebuggerStartParameters sp;
|
||||
sp.displayName = tr("Remote: \"%1\"").arg(channel);
|
||||
sp.remoteChannel = channel;
|
||||
sp.executable = localExecutable;
|
||||
sp.startMode = AttachToRemoteServer;
|
||||
sp.closeMode = KillAtClose;
|
||||
sp.overrideStartScript.clear();
|
||||
sp.useServerStartScript = false;
|
||||
sp.serverStartScript.clear();
|
||||
sp.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
|
||||
sp.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
|
||||
sp.connParams = device->sshParameters();
|
||||
if (ToolChain *tc = ToolChainProfileInformation::toolChain(profile))
|
||||
sp.toolChainAbi = tc->targetAbi();
|
||||
|
||||
if (RunControl *rc = DebuggerPlugin::createDebugger(sp))
|
||||
DebuggerPlugin::startDebugger(rc);
|
||||
}
|
||||
close();
|
||||
}
|
||||
|
||||
void StartGdbServerDialog::handleProcessClosed(int status)
|
||||
@@ -386,4 +443,4 @@ void StartGdbServerDialog::startGdbServerOnPort(int port, int pid)
|
||||
d->runner.run(cmd, device->sshParameters());
|
||||
}
|
||||
|
||||
} // namespace RemoteLinux
|
||||
} // namespace Debugger
|
||||
@@ -31,20 +31,20 @@
|
||||
#ifndef STARTGDBSERVERDIALOG_H
|
||||
#define STARTGDBSERVERDIALOG_H
|
||||
|
||||
#include "remotelinux_export.h"
|
||||
#include "debugger_global.h"
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace RemoteLinux {
|
||||
namespace Debugger {
|
||||
|
||||
namespace Internal { class StartGdbServerDialogPrivate; }
|
||||
|
||||
class REMOTELINUX_EXPORT StartGdbServerDialog : public QDialog
|
||||
class DEBUGGER_EXPORT StartGdbServerDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit StartGdbServerDialog(QWidget *parent = 0);
|
||||
StartGdbServerDialog(QWidget *parent);
|
||||
~StartGdbServerDialog();
|
||||
|
||||
void startGdbServer();
|
||||
@@ -78,6 +78,6 @@ private:
|
||||
Internal::StartGdbServerDialogPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace RemoteLinux
|
||||
} // namespace Debugger
|
||||
|
||||
#endif // STARTGDBSERVERDIALOG_H
|
||||
@@ -74,7 +74,7 @@ LldbOptionsPage::LldbOptionsPage()
|
||||
setId(QLatin1String("F.Lldb"));
|
||||
setDisplayName(tr("LLDB"));
|
||||
setCategory(QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Debugger", Constants::DEBUGGER_SETTINGS_TR_CATEGORY);
|
||||
setDisplayCategory(QCoreApplication::translate("Debugger", Constants::DEBUGGER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QIcon(QLatin1String(Constants::DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON)));
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ QVariant ModulesModel::data(const QModelIndex &index, int role) const
|
||||
case LinkedSymbols:
|
||||
case BuildIdSymbols:
|
||||
return ModulesHandler::tr(
|
||||
"This module does not contains debug information "
|
||||
"This module does not contain debug information "
|
||||
"itself, but contains a reference to external "
|
||||
"debug information.");
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "hostutils.h"
|
||||
#include "breakpoint.h"
|
||||
|
||||
#include <utils/synchronousprocess.h>
|
||||
|
||||
|
||||
@@ -396,8 +396,8 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
globalcontext, true, &GitClient::status);
|
||||
|
||||
createRepositoryAction(gitContainer,
|
||||
tr("Undo Uncommitted Changes..."), Core::Id("Git.UndoRepository"),
|
||||
globalcontext, false, SLOT(undoRepositoryChanges()));
|
||||
tr("Reset..."), Core::Id("Git.Reset"),
|
||||
globalcontext, false, SLOT(resetRepository()));
|
||||
|
||||
|
||||
createRepositoryAction(gitContainer,
|
||||
@@ -623,7 +623,7 @@ void GitPlugin::undoUnstagedFileChanges()
|
||||
undoFileChanges(false);
|
||||
}
|
||||
|
||||
void GitPlugin::undoRepositoryChanges()
|
||||
void GitPlugin::resetRepository()
|
||||
{
|
||||
const VcsBase::VcsBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasTopLevel(), return);
|
||||
|
||||
@@ -112,7 +112,7 @@ private slots:
|
||||
void logProject();
|
||||
void undoFileChanges(bool revertStaging = true);
|
||||
void undoUnstagedFileChanges();
|
||||
void undoRepositoryChanges();
|
||||
void resetRepository();
|
||||
void stageFile();
|
||||
void unstageFile();
|
||||
void cleanProject();
|
||||
|
||||
@@ -11,7 +11,6 @@ HEADERS += \
|
||||
debianmanager.h \
|
||||
maemoconstants.h \
|
||||
maemorunconfigurationwidget.h \
|
||||
maemoruncontrol.h \
|
||||
maemorunfactories.h \
|
||||
maemosettingspages.h \
|
||||
maemopackagecreationstep.h \
|
||||
@@ -20,8 +19,6 @@ HEADERS += \
|
||||
maemoqemumanager.h \
|
||||
maemodeploystepfactory.h \
|
||||
maemoglobal.h \
|
||||
maemosshrunner.h \
|
||||
maemodebugsupport.h \
|
||||
maemoremotemountsmodel.h \
|
||||
maemomountspecification.h \
|
||||
maemoremotemounter.h \
|
||||
@@ -52,13 +49,12 @@ HEADERS += \
|
||||
maddedevicetester.h \
|
||||
maddedeviceconfigurationfactory.h \
|
||||
maddedevice.h \
|
||||
rpmmanager.h
|
||||
maemoapplicationrunnerhelperactions.h
|
||||
|
||||
SOURCES += \
|
||||
maddeplugin.cpp \
|
||||
debianmanager.cpp \
|
||||
maemorunconfigurationwidget.cpp \
|
||||
maemoruncontrol.cpp \
|
||||
maemorunfactories.cpp \
|
||||
maemosettingspages.cpp \
|
||||
maemopackagecreationstep.cpp \
|
||||
@@ -67,8 +63,6 @@ SOURCES += \
|
||||
maemoqemumanager.cpp \
|
||||
maemodeploystepfactory.cpp \
|
||||
maemoglobal.cpp \
|
||||
maemosshrunner.cpp \
|
||||
maemodebugsupport.cpp \
|
||||
maemoremotemountsmodel.cpp \
|
||||
maemomountspecification.cpp \
|
||||
maemoremotemounter.cpp \
|
||||
@@ -98,7 +92,7 @@ SOURCES += \
|
||||
maddedevicetester.cpp \
|
||||
maemorunconfiguration.cpp \
|
||||
maddedevice.cpp \
|
||||
rpmmanager.cpp
|
||||
maemoapplicationrunnerhelperactions.cpp
|
||||
|
||||
FORMS += \
|
||||
maemopackagecreationwidget.ui \
|
||||
|
||||
@@ -31,8 +31,6 @@ QtcPlugin {
|
||||
"maddeuploadandinstallpackagesteps.cpp",
|
||||
"maddeuploadandinstallpackagesteps.h",
|
||||
"maemoconstants.h",
|
||||
"maemodebugsupport.cpp",
|
||||
"maemodebugsupport.h",
|
||||
"maemodeploybymountsteps.cpp",
|
||||
"maemodeploybymountsteps.h",
|
||||
"maemodeployconfigurationwidget.cpp",
|
||||
@@ -108,14 +106,10 @@ QtcPlugin {
|
||||
"maemorunconfiguration.h",
|
||||
"maemorunconfigurationwidget.cpp",
|
||||
"maemorunconfigurationwidget.h",
|
||||
"maemoruncontrol.cpp",
|
||||
"maemoruncontrol.h",
|
||||
"maemorunfactories.cpp",
|
||||
"maemorunfactories.h",
|
||||
"maemosettingspages.cpp",
|
||||
"maemosettingspages.h",
|
||||
"maemosshrunner.cpp",
|
||||
"maemosshrunner.h",
|
||||
"qt-maemo.qrc",
|
||||
"qt4maemodeployconfiguration.cpp",
|
||||
"qt4maemodeployconfiguration.h",
|
||||
@@ -123,7 +117,7 @@ QtcPlugin {
|
||||
"maddedevice.h",
|
||||
"debianmanager.h",
|
||||
"debianmanager.cpp",
|
||||
"rpmmanager.h",
|
||||
"rpmmanager.cpp"
|
||||
"maemoapplicationrunnerhelperactions.h",
|
||||
"maemoapplicationrunnerhelperactions.cpp"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -64,11 +64,11 @@ MaddeDevice::MaddeDevice()
|
||||
|
||||
MaddeDevice::MaddeDevice(const QString &name, Core::Id type, MachineType machineType,
|
||||
Origin origin, Core::Id id)
|
||||
: LinuxDeviceConfiguration(name, type, machineType, origin, id)
|
||||
: LinuxDevice(name, type, machineType, origin, id)
|
||||
{
|
||||
}
|
||||
|
||||
MaddeDevice::MaddeDevice(const MaddeDevice &other) : LinuxDeviceConfiguration(other)
|
||||
MaddeDevice::MaddeDevice(const MaddeDevice &other) : LinuxDevice(other)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -125,7 +125,8 @@ QString MaddeDevice::maddeDisplayType(Core::Id type)
|
||||
return tr("Maemo5/Fremantle");
|
||||
if (type == Core::Id(HarmattanOsType))
|
||||
return tr("MeeGo 1.2 Harmattan");
|
||||
return tr("Other MeeGo OS");
|
||||
QTC_ASSERT(false, return QString());
|
||||
return QString(); // For crappy compilers.
|
||||
}
|
||||
|
||||
bool MaddeDevice::allowsRemoteMounts(Core::Id type)
|
||||
@@ -143,11 +144,6 @@ bool MaddeDevice::allowsQmlDebugging(Core::Id type)
|
||||
return type == Core::Id(HarmattanOsType);
|
||||
}
|
||||
|
||||
bool MaddeDevice::isDebianBased(Core::Id type)
|
||||
{
|
||||
return type != Core::Id(MeeGoOsType);
|
||||
}
|
||||
|
||||
QSize MaddeDevice::packageManagerIconSize(Core::Id type)
|
||||
{
|
||||
if (type == Core::Id(Maemo5OsType))
|
||||
|
||||
@@ -27,17 +27,18 @@
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef MADDEDEVICE_H
|
||||
#define MADDEDEVICE_H
|
||||
|
||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
||||
#include <remotelinux/linuxdevice.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
|
||||
class MaddeDevice : public RemoteLinux::LinuxDeviceConfiguration
|
||||
class MaddeDevice : public RemoteLinux::LinuxDevice
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Madde::Internal::MaddeDevice)
|
||||
public:
|
||||
@@ -59,7 +60,6 @@ public:
|
||||
static bool allowsPackagingDisabling(Core::Id type);
|
||||
static bool allowsQmlDebugging(Core::Id type);
|
||||
|
||||
static bool isDebianBased(Core::Id type);
|
||||
static QSize packageManagerIconSize(Core::Id type);
|
||||
|
||||
private:
|
||||
|
||||
@@ -53,7 +53,7 @@ QString MaddeDeviceConfigurationFactory::displayNameForId(Core::Id type) const
|
||||
|
||||
QList<Core::Id> MaddeDeviceConfigurationFactory::availableCreationIds() const
|
||||
{
|
||||
return QList<Core::Id>() << Core::Id(Maemo5OsType) << Core::Id(HarmattanOsType) << Core::Id(MeeGoOsType);
|
||||
return QList<Core::Id>() << Core::Id(Maemo5OsType) << Core::Id(HarmattanOsType);
|
||||
}
|
||||
|
||||
IDevice::Ptr MaddeDeviceConfigurationFactory::create(Core::Id id) const
|
||||
@@ -67,8 +67,7 @@ IDevice::Ptr MaddeDeviceConfigurationFactory::create(Core::Id id) const
|
||||
bool MaddeDeviceConfigurationFactory::canRestore(const QVariantMap &map) const
|
||||
{
|
||||
const Core::Id type = IDevice::typeFromMap(map);
|
||||
return type == Core::Id(Maemo5OsType) || type == Core::Id(HarmattanOsType)
|
||||
|| type == Core::Id(MeeGoOsType);
|
||||
return type == Core::Id(Maemo5OsType) || type == Core::Id(HarmattanOsType);
|
||||
}
|
||||
|
||||
IDevice::Ptr MaddeDeviceConfigurationFactory::restore(const QVariantMap &map) const
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "maemoconstants.h"
|
||||
#include "maemoglobal.h"
|
||||
|
||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
||||
#include <remotelinux/linuxdevice.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
|
||||
@@ -110,14 +110,8 @@ void MaddeDeviceTester::handleGenericTestFinished(TestResult result)
|
||||
connect(m_processRunner, SIGNAL(connectionError()), SLOT(handleConnectionError()));
|
||||
connect(m_processRunner, SIGNAL(processClosed(int)), SLOT(handleProcessFinished(int)));
|
||||
|
||||
QString qtInfoCmd;
|
||||
if (m_deviceConfiguration->type() == Core::Id(MeeGoOsType)) {
|
||||
qtInfoCmd = QLatin1String("rpm -qa 'libqt*' --queryformat '%{NAME} %{VERSION}\\n'");
|
||||
} else {
|
||||
qtInfoCmd = QLatin1String("dpkg-query -W -f "
|
||||
const QString qtInfoCmd = QLatin1String("dpkg-query -W -f "
|
||||
"'${Package} ${Version} ${Status}\n' 'libqt*' |grep ' installed$'");
|
||||
}
|
||||
|
||||
emit progressMessage(tr("Checking for Qt libraries..."));
|
||||
m_state = QtTest;
|
||||
m_processRunner->run(qtInfoCmd.toUtf8(), m_deviceConfiguration->sshParameters());
|
||||
@@ -234,11 +228,8 @@ QString MaddeDeviceTester::processedQtLibsList()
|
||||
{
|
||||
QString unfilteredLibs = QString::fromUtf8(m_processRunner->readAllStandardOutput());
|
||||
QString filteredLibs;
|
||||
QString patternString;
|
||||
if (m_deviceConfiguration->type() == Core::Id(MeeGoOsType))
|
||||
patternString = QLatin1String("(libqt\\S+) ((\\d+)\\.(\\d+)\\.(\\d+))");
|
||||
else
|
||||
patternString = QLatin1String("(\\S+) (\\S*(\\d+)\\.(\\d+)\\.(\\d+)\\S*) \\S+ \\S+ \\S+");
|
||||
const QString patternString
|
||||
= QLatin1String("(\\S+) (\\S*(\\d+)\\.(\\d+)\\.(\\d+)\\S*) \\S+ \\S+ \\S+");
|
||||
QRegExp packagePattern(patternString);
|
||||
int index = packagePattern.indexIn(unfilteredLibs);
|
||||
if (index == -1)
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
#include "maemorunfactories.h"
|
||||
#include "maemosettingspages.h"
|
||||
#include "qt4maemodeployconfiguration.h"
|
||||
#include "rpmmanager.h"
|
||||
#include "maemoqtversionfactory.h"
|
||||
|
||||
#include <QtPlugin>
|
||||
@@ -74,7 +73,6 @@ bool MaddePlugin::initialize(const QStringList &arguments, QString *error_messag
|
||||
addAutoReleasedObject(new MaddeDeviceConfigurationFactory);
|
||||
|
||||
new DebianManager(this);
|
||||
new RpmManager(this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -126,23 +126,6 @@ private:
|
||||
HarmattanPackageInstaller * const m_installer;
|
||||
};
|
||||
|
||||
class MeegoUploadAndInstallPackageAction : public AbstractMaddeUploadAndInstallPackageAction
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MeegoUploadAndInstallPackageAction(AbstractRemoteLinuxDeployStep *step)
|
||||
: AbstractMaddeUploadAndInstallPackageAction(step),
|
||||
m_installer(new MaemoRpmPackageInstaller(this))
|
||||
{
|
||||
}
|
||||
|
||||
AbstractRemoteLinuxPackageInstaller *packageInstaller() const { return m_installer; }
|
||||
|
||||
private:
|
||||
MaemoRpmPackageInstaller * const m_installer;
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
@@ -196,53 +179,6 @@ QString MaemoUploadAndInstallPackageStep::displayName()
|
||||
return tr("Deploy Debian package via SFTP upload");
|
||||
}
|
||||
|
||||
|
||||
MeegoUploadAndInstallPackageStep::MeegoUploadAndInstallPackageStep(ProjectExplorer::BuildStepList *bsl)
|
||||
: AbstractRemoteLinuxDeployStep(bsl, stepId())
|
||||
{
|
||||
ctor();
|
||||
}
|
||||
|
||||
MeegoUploadAndInstallPackageStep::MeegoUploadAndInstallPackageStep(ProjectExplorer::BuildStepList *bsl,
|
||||
MeegoUploadAndInstallPackageStep *other) : AbstractRemoteLinuxDeployStep(bsl, other)
|
||||
{
|
||||
ctor();
|
||||
}
|
||||
|
||||
void MeegoUploadAndInstallPackageStep::ctor()
|
||||
{
|
||||
setDefaultDisplayName(displayName());
|
||||
m_deployService = new MeegoUploadAndInstallPackageAction(this);
|
||||
}
|
||||
|
||||
AbstractRemoteLinuxDeployService *MeegoUploadAndInstallPackageStep::deployService() const
|
||||
{
|
||||
return m_deployService;
|
||||
}
|
||||
|
||||
bool MeegoUploadAndInstallPackageStep::initInternal(QString *error)
|
||||
{
|
||||
const AbstractMaemoPackageCreationStep * const pStep
|
||||
= deployConfiguration()->earlierBuildStep<MaemoRpmPackageCreationStep>(this);
|
||||
if (!pStep) {
|
||||
if (error)
|
||||
*error = tr("No RPM package creation step found.");
|
||||
return false;
|
||||
}
|
||||
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
||||
return deployService()->isDeploymentPossible(error);
|
||||
}
|
||||
|
||||
Core::Id MeegoUploadAndInstallPackageStep::stepId()
|
||||
{
|
||||
return Core::Id("MaemoUploadAndInstallRpmPackageStep");
|
||||
}
|
||||
|
||||
QString MeegoUploadAndInstallPackageStep::displayName()
|
||||
{
|
||||
return tr("Deploy RPM package via SFTP upload");
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
|
||||
|
||||
@@ -60,27 +60,6 @@ private:
|
||||
RemoteLinux::AbstractUploadAndInstallPackageService *m_deployService;
|
||||
};
|
||||
|
||||
class MeegoUploadAndInstallPackageStep : public RemoteLinux::AbstractRemoteLinuxDeployStep
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MeegoUploadAndInstallPackageStep(ProjectExplorer::BuildStepList *bsl);
|
||||
MeegoUploadAndInstallPackageStep(ProjectExplorer::BuildStepList *bsl,
|
||||
MeegoUploadAndInstallPackageStep *other);
|
||||
|
||||
bool initInternal(QString *error);
|
||||
|
||||
static Core::Id stepId();
|
||||
static QString displayName();
|
||||
|
||||
private:
|
||||
RemoteLinux::AbstractRemoteLinuxDeployService *deployService() const;
|
||||
|
||||
void ctor();
|
||||
|
||||
RemoteLinux::AbstractUploadAndInstallPackageService *m_deployService;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
|
||||
|
||||
148
src/plugins/madde/maemoapplicationrunnerhelperactions.cpp
Normal file
148
src/plugins/madde/maemoapplicationrunnerhelperactions.cpp
Normal file
@@ -0,0 +1,148 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
#include "maemoapplicationrunnerhelperactions.h"
|
||||
|
||||
#include "maemomountspecification.h"
|
||||
#include "maemoremotemounter.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
|
||||
MaemoPreRunAction::MaemoPreRunAction(const IDevice::ConstPtr &device, const FileName &maddeRoot,
|
||||
const QList<MaemoMountSpecification> &mountSpecs, QObject *parent)
|
||||
: DeviceApplicationHelperAction(parent), m_mounter(new MaemoRemoteMounter(this))
|
||||
{
|
||||
m_mounter->setParameters(device, maddeRoot);
|
||||
foreach (const MaemoMountSpecification &m, mountSpecs)
|
||||
m_mounter->addMountSpecification(m, false);
|
||||
}
|
||||
|
||||
void MaemoPreRunAction::handleMounted()
|
||||
{
|
||||
QTC_ASSERT(m_isRunning, return);
|
||||
|
||||
setFinished(true);
|
||||
}
|
||||
|
||||
void MaemoPreRunAction::handleError(const QString &message)
|
||||
{
|
||||
if (!m_isRunning)
|
||||
return;
|
||||
|
||||
emit reportError(message);
|
||||
setFinished(false);
|
||||
}
|
||||
|
||||
void MaemoPreRunAction::start()
|
||||
{
|
||||
QTC_ASSERT(!m_isRunning, return);
|
||||
|
||||
connect(m_mounter, SIGNAL(debugOutput(QString)), SIGNAL(reportProgress(QString)));
|
||||
connect(m_mounter, SIGNAL(reportProgress(QString)), SIGNAL(reportProgress(QString)));
|
||||
connect(m_mounter, SIGNAL(mounted()), SLOT(handleMounted()));
|
||||
connect(m_mounter, SIGNAL(error(QString)), SLOT(handleError(QString)));
|
||||
m_isRunning = true;
|
||||
m_mounter->mount();
|
||||
}
|
||||
|
||||
void MaemoPreRunAction::stop()
|
||||
{
|
||||
QTC_ASSERT(m_isRunning, return);
|
||||
|
||||
m_mounter->stop();
|
||||
setFinished(false);
|
||||
}
|
||||
|
||||
void MaemoPreRunAction::setFinished(bool success)
|
||||
{
|
||||
QTC_ASSERT(m_isRunning, return);
|
||||
|
||||
m_mounter->disconnect(this);
|
||||
m_isRunning = false;
|
||||
emit finished(success);
|
||||
}
|
||||
|
||||
MaemoPostRunAction::MaemoPostRunAction(MaemoRemoteMounter *mounter, QObject *parent)
|
||||
: DeviceApplicationHelperAction(parent), m_mounter(mounter)
|
||||
{
|
||||
}
|
||||
|
||||
void MaemoPostRunAction::handleUnmounted()
|
||||
{
|
||||
QTC_ASSERT(m_isRunning, return);
|
||||
|
||||
setFinished(true);
|
||||
}
|
||||
|
||||
void MaemoPostRunAction::handleError(const QString &message)
|
||||
{
|
||||
if (!m_isRunning)
|
||||
return;
|
||||
|
||||
emit reportError(message);
|
||||
setFinished(false);
|
||||
}
|
||||
|
||||
void MaemoPostRunAction::start()
|
||||
{
|
||||
QTC_ASSERT(!m_isRunning, return);
|
||||
|
||||
connect(m_mounter, SIGNAL(debugOutput(QString)), SIGNAL(reportProgress(QString)));
|
||||
connect(m_mounter, SIGNAL(reportProgress(QString)), SIGNAL(reportProgress(QString)));
|
||||
connect(m_mounter, SIGNAL(unmounted()), SLOT(handleUnmounted()));
|
||||
connect(m_mounter, SIGNAL(error(QString)), SLOT(handleError(QString)));
|
||||
m_isRunning = true;
|
||||
m_mounter->unmount();
|
||||
}
|
||||
|
||||
void MaemoPostRunAction::stop()
|
||||
{
|
||||
QTC_ASSERT(m_isRunning, return);
|
||||
|
||||
m_mounter->stop();
|
||||
setFinished(false);
|
||||
}
|
||||
|
||||
void MaemoPostRunAction::setFinished(bool success)
|
||||
{
|
||||
QTC_ASSERT(m_isRunning, return);
|
||||
|
||||
m_mounter->disconnect(this);
|
||||
m_isRunning = false;
|
||||
emit finished(success);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
@@ -6,6 +6,7 @@
|
||||
**
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
@@ -26,54 +27,65 @@
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
#ifndef MAEMOAPPLICATIONRUNNERHELPERACTIONS_H
|
||||
#define MAEMOAPPLICATIONRUNNERHELPERACTIONS_H
|
||||
|
||||
#ifndef MAEMOSSHRUNNER_H
|
||||
#define MAEMOSSHRUNNER_H
|
||||
#include <projectexplorer/devicesupport/deviceapplicationrunner.h>
|
||||
|
||||
#include "maemomountspecification.h"
|
||||
#include <QList>
|
||||
|
||||
#include <remotelinux/remotelinuxapplicationrunner.h>
|
||||
namespace Utils { class FileName; }
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
class MaemoMountSpecification;
|
||||
class MaemoRemoteMounter;
|
||||
class MaemoRunConfiguration;
|
||||
|
||||
class MaemoSshRunner : public RemoteLinux::AbstractRemoteLinuxApplicationRunner
|
||||
class MaemoPreRunAction : public ProjectExplorer::DeviceApplicationHelperAction
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig);
|
||||
MaemoPreRunAction(const ProjectExplorer::IDevice::ConstPtr &device,
|
||||
const Utils::FileName &maddeRoot, const QList<MaemoMountSpecification> &mountSpecs,
|
||||
QObject *parent = 0);
|
||||
|
||||
signals:
|
||||
void mountDebugOutput(const QString &output);
|
||||
MaemoRemoteMounter *mounter() const { return m_mounter; }
|
||||
|
||||
private slots:
|
||||
void handleMounted();
|
||||
void handleUnmounted();
|
||||
void handleMounterError(const QString &errorMsg);
|
||||
void handleError(const QString &message);
|
||||
|
||||
private:
|
||||
enum MountState { InactiveMountState, InitialUnmounting, Mounting, Mounted, PostRunUnmounting };
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
bool canRun(QString &whyNot) const;
|
||||
void doDeviceSetup();
|
||||
void doAdditionalInitialCleanup();
|
||||
void doAdditionalInitializations();
|
||||
void doPostRunCleanup();
|
||||
void doAdditionalConnectionErrorHandling();
|
||||
|
||||
void mount();
|
||||
void unmount();
|
||||
void setFinished(bool success);
|
||||
|
||||
MaemoRemoteMounter * const m_mounter;
|
||||
QList<MaemoMountSpecification> m_mountSpecs;
|
||||
MountState m_mountState;
|
||||
int m_qtId;
|
||||
bool m_isRunning;
|
||||
};
|
||||
|
||||
class MaemoPostRunAction : public ProjectExplorer::DeviceApplicationHelperAction
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MaemoPostRunAction(MaemoRemoteMounter *mounter, QObject *parent = 0);
|
||||
|
||||
private slots:
|
||||
void handleUnmounted();
|
||||
void handleError(const QString &message);
|
||||
|
||||
private:
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
void setFinished(bool success);
|
||||
|
||||
MaemoRemoteMounter * const m_mounter;
|
||||
bool m_isRunning;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
|
||||
#endif // MAEMOSSHRUNNER_H
|
||||
#endif // MAEMOAPPLICATIONRUNNERHELPERACTIONS_H
|
||||
@@ -37,7 +37,6 @@ namespace Internal {
|
||||
|
||||
const char Maemo5OsType[] = "Maemo5OsType";
|
||||
const char HarmattanOsType[] = "HarmattanOsType";
|
||||
const char MeeGoOsType[] = "MeeGoOsType";
|
||||
|
||||
#define PREFIX "Qt4ProjectManager.MaemoRunConfiguration"
|
||||
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
#include "maemodebugsupport.h"
|
||||
|
||||
#include "maemorunconfiguration.h"
|
||||
#include "maemosshrunner.h"
|
||||
|
||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
||||
|
||||
using namespace RemoteLinux;
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
|
||||
MaemoDebugSupport::MaemoDebugSupport(MaemoRunConfiguration *runConfig, Debugger::DebuggerEngine *engine)
|
||||
: AbstractRemoteLinuxDebugSupport(runConfig, engine),
|
||||
m_runner(new MaemoSshRunner(this, runConfig))
|
||||
{
|
||||
}
|
||||
|
||||
MaemoDebugSupport::~MaemoDebugSupport()
|
||||
{
|
||||
}
|
||||
|
||||
AbstractRemoteLinuxApplicationRunner *MaemoDebugSupport::runner() const { return m_runner; }
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
@@ -1,56 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef MAEMODEBUGSUPPORT_H
|
||||
#define MAEMODEBUGSUPPORT_H
|
||||
|
||||
#include <remotelinux/remotelinuxdebugsupport.h>
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
class MaemoRunConfiguration;
|
||||
class MaemoSshRunner;
|
||||
|
||||
class MaemoDebugSupport : public RemoteLinux::AbstractRemoteLinuxDebugSupport
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MaemoDebugSupport(MaemoRunConfiguration *runConfig, Debugger::DebuggerEngine *engine);
|
||||
~MaemoDebugSupport();
|
||||
|
||||
private:
|
||||
RemoteLinux::AbstractRemoteLinuxApplicationRunner *runner() const;
|
||||
|
||||
MaemoSshRunner * const m_runner;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
|
||||
#endif // MAEMODEBUGSUPPORT_H
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <remotelinux/abstractremotelinuxdeployservice.h>
|
||||
#include <remotelinux/deployablefile.h>
|
||||
#include <remotelinux/deploymentinfo.h>
|
||||
#include <remotelinux/linuxdeviceconfiguration.h>
|
||||
#include <remotelinux/linuxdevice.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <ssh/sshconnection.h>
|
||||
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/profileinformation.h>
|
||||
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <ssh/sshconnection.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace RemoteLinux;
|
||||
using namespace QSsh;
|
||||
|
||||
namespace Madde {
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
#include <utils/portlist.h>
|
||||
|
||||
#include <QSharedPointer>
|
||||
|
||||
namespace ProjectExplorer { class Profile; }
|
||||
namespace QSsh { class SshConnection; }
|
||||
namespace Utils { class FileName; }
|
||||
@@ -49,6 +47,7 @@ class MaemoRemoteMounter;
|
||||
class MaemoDeploymentMounter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MaemoDeploymentMounter(QObject *parent = 0);
|
||||
~MaemoDeploymentMounter();
|
||||
|
||||
@@ -84,10 +84,6 @@ QList<Core::Id> MaemoDeployStepFactory::availableCreationIds(BuildStepList *pare
|
||||
<< Core::Id(MaemoInstallDebianPackageToSysrootStep::Id)
|
||||
<< Core::Id(MaemoUploadAndInstallPackageStep::stepId())
|
||||
<< Core::Id(GenericDirectUploadStep::stepId());
|
||||
} else if (platform == QtSupport::Constants::MEEGO_PLATFORM) {
|
||||
ids << Core::Id(MaemoMakeInstallToSysrootStep::Id)
|
||||
<< Core::Id(MaemoInstallRpmPackageToSysrootStep::Id)
|
||||
<< Core::Id(MeegoUploadAndInstallPackageStep::stepId());
|
||||
}
|
||||
|
||||
return ids;
|
||||
@@ -101,12 +97,8 @@ QString MaemoDeployStepFactory::displayNameForId(const Core::Id id) const
|
||||
return MaemoCopyFilesViaMountStep::displayName();
|
||||
else if (id == MaemoUploadAndInstallPackageStep::stepId())
|
||||
return MaemoUploadAndInstallPackageStep::displayName();
|
||||
else if (id == MeegoUploadAndInstallPackageStep::stepId())
|
||||
return MeegoUploadAndInstallPackageStep::displayName();
|
||||
else if (id == MaemoInstallDebianPackageToSysrootStep::Id)
|
||||
return MaemoInstallDebianPackageToSysrootStep::displayName();
|
||||
else if (id == MaemoInstallRpmPackageToSysrootStep::Id)
|
||||
return MaemoInstallRpmPackageToSysrootStep::displayName();
|
||||
else if (id == MaemoCopyToSysrootStep::Id)
|
||||
return MaemoCopyToSysrootStep::displayName();
|
||||
else if (id == MaemoMakeInstallToSysrootStep::Id)
|
||||
@@ -130,8 +122,6 @@ BuildStep *MaemoDeployStepFactory::create(BuildStepList *parent, const Core::Id
|
||||
|
||||
if (id == MaemoInstallDebianPackageToSysrootStep::Id) {
|
||||
return new MaemoInstallDebianPackageToSysrootStep(parent);
|
||||
} else if (id == MaemoInstallRpmPackageToSysrootStep::Id) {
|
||||
return new MaemoInstallRpmPackageToSysrootStep(parent);
|
||||
} else if (id == MaemoCopyToSysrootStep::Id) {
|
||||
return new MaemoCopyToSysrootStep(parent);
|
||||
} else if (id == MaemoMakeInstallToSysrootStep::Id) {
|
||||
@@ -144,9 +134,6 @@ BuildStep *MaemoDeployStepFactory::create(BuildStepList *parent, const Core::Id
|
||||
} else if (id == MaemoUploadAndInstallPackageStep::stepId()
|
||||
|| (id == Core::Id(OldMaemoDeployStepId) && deviceType == Core::Id(HarmattanOsType))) {
|
||||
return new MaemoUploadAndInstallPackageStep(parent);
|
||||
} else if (id == MeegoUploadAndInstallPackageStep::stepId()
|
||||
|| (id == Core::Id(OldMaemoDeployStepId) && deviceType == Core::Id(MeeGoOsType))) {
|
||||
return new MeegoUploadAndInstallPackageStep(parent);
|
||||
} else if (id == GenericDirectUploadStep::stepId()) {
|
||||
return new GenericDirectUploadStep(parent, id);
|
||||
} else if (id == RemoteLinuxCheckForFreeDiskSpaceStep::stepId()) {
|
||||
@@ -190,15 +177,9 @@ BuildStep *MaemoDeployStepFactory::clone(BuildStepList *parent, BuildStep *produ
|
||||
} else if (product->id() == MaemoUploadAndInstallPackageStep::stepId()) {
|
||||
return new MaemoUploadAndInstallPackageStep(parent,
|
||||
qobject_cast<MaemoUploadAndInstallPackageStep*>(product));
|
||||
} else if (product->id() == MeegoUploadAndInstallPackageStep::stepId()) {
|
||||
return new MeegoUploadAndInstallPackageStep(parent,
|
||||
qobject_cast<MeegoUploadAndInstallPackageStep*>(product));
|
||||
} else if (product->id() == MaemoInstallDebianPackageToSysrootStep::Id) {
|
||||
return new MaemoInstallDebianPackageToSysrootStep(parent,
|
||||
qobject_cast<MaemoInstallDebianPackageToSysrootStep *>(product));
|
||||
} else if (product->id() == MaemoInstallRpmPackageToSysrootStep::Id) {
|
||||
return new MaemoInstallRpmPackageToSysrootStep(parent,
|
||||
qobject_cast<MaemoInstallRpmPackageToSysrootStep *>(product));
|
||||
} else if (product->id() == MaemoCopyToSysrootStep::Id) {
|
||||
return new MaemoCopyToSysrootStep(parent,
|
||||
qobject_cast<MaemoCopyToSysrootStep *>(product));
|
||||
|
||||
@@ -61,10 +61,8 @@ namespace Madde {
|
||||
namespace Internal {
|
||||
namespace {
|
||||
|
||||
QString defaultUser(Core::Id deviceType)
|
||||
QString defaultUser()
|
||||
{
|
||||
if (deviceType == Core::Id(MeeGoOsType))
|
||||
return QLatin1String("meego");
|
||||
return QLatin1String("developer");
|
||||
}
|
||||
|
||||
@@ -448,7 +446,7 @@ private:
|
||||
sshParams.port = m_wizardData.sshPort;
|
||||
sshParams.password = password();
|
||||
sshParams.timeout = 10;
|
||||
sshParams.userName = defaultUser(m_wizardData.deviceType);
|
||||
sshParams.userName = defaultUser();
|
||||
m_ui->statusLabel->setText(tr("Deploying... "));
|
||||
m_keyDeployer->deployPublicKey(sshParams, m_wizardData.publicKeyFilePath);
|
||||
}
|
||||
@@ -558,13 +556,12 @@ IDevice::Ptr MaemoDeviceConfigWizard::device()
|
||||
bool doTest;
|
||||
QString freePortsSpec;
|
||||
QSsh::SshConnectionParameters sshParams;
|
||||
sshParams.userName = defaultUser(d->wizardData.deviceType);
|
||||
sshParams.userName = defaultUser();
|
||||
sshParams.host = d->wizardData.hostName;
|
||||
sshParams.port = d->wizardData.sshPort;
|
||||
if (d->wizardData.machineType == IDevice::Emulator) {
|
||||
sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationByPassword;
|
||||
sshParams.password = d->wizardData.deviceType == Core::Id(MeeGoOsType)
|
||||
? QLatin1String("meego") : QString();
|
||||
sshParams.password = QString();
|
||||
sshParams.timeout = 30;
|
||||
freePortsSpec = QLatin1String("13219,14168");
|
||||
doTest = false;
|
||||
@@ -575,15 +572,15 @@ IDevice::Ptr MaemoDeviceConfigWizard::device()
|
||||
freePortsSpec = QLatin1String("10000-10100");
|
||||
doTest = true;
|
||||
}
|
||||
const MaddeDevice::Ptr devConf = MaddeDevice::create(d->wizardData.configName,
|
||||
const MaddeDevice::Ptr device = MaddeDevice::create(d->wizardData.configName,
|
||||
d->wizardData.deviceType, d->wizardData.machineType);
|
||||
devConf->setFreePorts(PortList::fromString(freePortsSpec));
|
||||
devConf->setSshParameters(sshParams);
|
||||
device->setFreePorts(PortList::fromString(freePortsSpec));
|
||||
device->setSshParameters(sshParams);
|
||||
if (doTest) {
|
||||
LinuxDeviceTestDialog dlg(devConf, new MaddeDeviceTester(this), this);
|
||||
LinuxDeviceTestDialog dlg(device, new MaddeDeviceTester(this), this);
|
||||
dlg.exec();
|
||||
}
|
||||
return devConf;
|
||||
return device;
|
||||
}
|
||||
|
||||
int MaemoDeviceConfigWizard::nextId() const
|
||||
|
||||
@@ -65,15 +65,13 @@ bool MaemoGlobal::hasMaemoDevice(const Profile *p)
|
||||
return false;
|
||||
|
||||
const Core::Id type = dev->type();
|
||||
return type == Core::Id(Maemo5OsType) || type == Core::Id(HarmattanOsType)
|
||||
|| type == Core::Id(MeeGoOsType);
|
||||
return type == Core::Id(Maemo5OsType) || type == Core::Id(HarmattanOsType);
|
||||
}
|
||||
|
||||
bool MaemoGlobal::supportsMaemoDevice(const Profile *p)
|
||||
{
|
||||
const Core::Id type = DeviceTypeProfileInformation::deviceTypeId(p);
|
||||
return type == Core::Id(Maemo5OsType) || type == Core::Id(HarmattanOsType)
|
||||
|| type == Core::Id(MeeGoOsType);
|
||||
return type == Core::Id(Maemo5OsType) || type == Core::Id(HarmattanOsType);
|
||||
}
|
||||
|
||||
bool MaemoGlobal::isValidMaemo5QtVersion(const QString &qmakePath)
|
||||
@@ -86,11 +84,6 @@ bool MaemoGlobal::isValidHarmattanQtVersion(const QString &qmakePath)
|
||||
return isValidMaemoQtVersion(qmakePath, Core::Id(HarmattanOsType));
|
||||
}
|
||||
|
||||
bool MaemoGlobal::isValidMeegoQtVersion(const QString &qmakePath)
|
||||
{
|
||||
return isValidMaemoQtVersion(qmakePath, Core::Id(MeeGoOsType));
|
||||
}
|
||||
|
||||
bool MaemoGlobal::isValidMaemoQtVersion(const QString &qmakePath, Core::Id deviceType)
|
||||
{
|
||||
if (MaemoGlobal::deviceType(qmakePath) != deviceType)
|
||||
@@ -136,10 +129,8 @@ QString MaemoGlobal::remoteSudo(Core::Id deviceType, const QString &uname)
|
||||
{
|
||||
if (uname == QLatin1String("root"))
|
||||
return QString();
|
||||
if (deviceType == Core::Id(Maemo5OsType) || deviceType == Core::Id(HarmattanOsType)
|
||||
|| deviceType == Core::Id(MeeGoOsType)) {
|
||||
if (deviceType == Core::Id(Maemo5OsType) || deviceType == Core::Id(HarmattanOsType))
|
||||
return devrootshPath();
|
||||
}
|
||||
return QString(); // Using sudo would open a can of worms.
|
||||
}
|
||||
|
||||
@@ -155,18 +146,18 @@ QString MaemoGlobal::remoteSourceProfilesCommand()
|
||||
|
||||
Utils::PortList MaemoGlobal::freePorts(const Profile *profile)
|
||||
{
|
||||
IDevice::ConstPtr devConf = DeviceProfileInformation::device(profile);
|
||||
IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
|
||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(profile);
|
||||
|
||||
if (!devConf || !qtVersion)
|
||||
if (!device || !qtVersion)
|
||||
return Utils::PortList();
|
||||
if (devConf->machineType() == IDevice::Emulator) {
|
||||
if (device->machineType() == IDevice::Emulator) {
|
||||
MaemoQemuRuntime rt;
|
||||
const int id = qtVersion->uniqueId();
|
||||
if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt))
|
||||
return rt.m_freePorts;
|
||||
}
|
||||
return devConf->freePorts();
|
||||
return device->freePorts();
|
||||
}
|
||||
|
||||
QString MaemoGlobal::maddeRoot(const QString &qmakePath)
|
||||
@@ -219,8 +210,6 @@ Core::Id MaemoGlobal::deviceType(const QString &qmakePath)
|
||||
return Core::Id(Maemo5OsType);
|
||||
if (name.startsWith(QLatin1String("harmattan")))
|
||||
return Core::Id(HarmattanOsType);
|
||||
if (name.startsWith(QLatin1String("meego")))
|
||||
return Core::Id(MeeGoOsType);
|
||||
return Core::Id(RemoteLinux::Constants::GenericLinuxOsType);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,13 +81,10 @@ class MaemoGlobal
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::MaemoGlobal)
|
||||
public:
|
||||
enum PackagingSystem { Dpkg, Rpm, Tar };
|
||||
|
||||
static bool hasMaemoDevice(const ProjectExplorer::Profile *p);
|
||||
static bool supportsMaemoDevice(const ProjectExplorer::Profile *p);
|
||||
static bool isValidMaemo5QtVersion(const QString &qmakePath);
|
||||
static bool isValidHarmattanQtVersion(const QString &qmakePath);
|
||||
static bool isValidMeegoQtVersion(const QString &qmakePath);
|
||||
|
||||
static QString homeDirOnDevice(const QString &uname);
|
||||
static QString devrootshPath();
|
||||
|
||||
@@ -106,15 +106,6 @@ public:
|
||||
virtual QString displayName() const { return MaemoInstallDebianPackageToSysrootStep::displayName(); }
|
||||
};
|
||||
|
||||
class MaemoInstallRpmPackageToSysrootWidget : public AbstractMaemoInstallPackageToSysrootWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MaemoInstallRpmPackageToSysrootWidget(AbstractMaemoInstallPackageToSysrootStep *step)
|
||||
: AbstractMaemoInstallPackageToSysrootWidget(step) {}
|
||||
|
||||
virtual QString displayName() const { return MaemoInstallRpmPackageToSysrootStep::displayName(); }
|
||||
};
|
||||
|
||||
class MaemoCopyFilesToSysrootWidget : public BuildStepConfigWidget
|
||||
{
|
||||
@@ -259,37 +250,6 @@ QString MaemoInstallDebianPackageToSysrootStep::displayName()
|
||||
return tr("Install Debian package to sysroot");
|
||||
}
|
||||
|
||||
MaemoInstallRpmPackageToSysrootStep::MaemoInstallRpmPackageToSysrootStep(BuildStepList *bsl)
|
||||
: AbstractMaemoInstallPackageToSysrootStep(bsl, Id)
|
||||
{
|
||||
setDisplayName(displayName());
|
||||
}
|
||||
|
||||
MaemoInstallRpmPackageToSysrootStep::MaemoInstallRpmPackageToSysrootStep(BuildStepList *bsl,
|
||||
MaemoInstallRpmPackageToSysrootStep *other)
|
||||
: AbstractMaemoInstallPackageToSysrootStep(bsl, other)
|
||||
{
|
||||
setDisplayName(displayName());
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *MaemoInstallRpmPackageToSysrootStep::createConfigWidget()
|
||||
{
|
||||
return new MaemoInstallRpmPackageToSysrootWidget(this);
|
||||
}
|
||||
|
||||
QStringList MaemoInstallRpmPackageToSysrootStep::madArguments() const
|
||||
{
|
||||
return QStringList() << QLatin1String("xrpm") << QLatin1String("-i");
|
||||
}
|
||||
|
||||
const Core::Id MaemoInstallRpmPackageToSysrootStep::Id
|
||||
= Core::Id("MaemoInstallRpmPackageToSysrootStep");
|
||||
|
||||
QString MaemoInstallRpmPackageToSysrootStep::displayName()
|
||||
{
|
||||
return tr("Install RPM package to sysroot");
|
||||
}
|
||||
|
||||
MaemoCopyToSysrootStep::MaemoCopyToSysrootStep(BuildStepList *bsl)
|
||||
: BuildStep(bsl, Id)
|
||||
{
|
||||
|
||||
@@ -89,22 +89,6 @@ private:
|
||||
virtual QStringList madArguments() const;
|
||||
};
|
||||
|
||||
class MaemoInstallRpmPackageToSysrootStep : public AbstractMaemoInstallPackageToSysrootStep
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MaemoInstallRpmPackageToSysrootStep(ProjectExplorer::BuildStepList *bsl);
|
||||
MaemoInstallRpmPackageToSysrootStep(ProjectExplorer::BuildStepList *bsl,
|
||||
MaemoInstallRpmPackageToSysrootStep *other);
|
||||
|
||||
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
|
||||
|
||||
static const Core::Id Id;
|
||||
static QString displayName();
|
||||
private:
|
||||
virtual QStringList madArguments() const;
|
||||
};
|
||||
|
||||
class MaemoCopyToSysrootStep : public ProjectExplorer::BuildStep
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <projectexplorer/profileinformation.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
@@ -61,13 +62,8 @@ QList<Core::Id> MaemoPackageCreationFactory::availableCreationIds(ProjectExplore
|
||||
QList<Core::Id> ids;
|
||||
if (!qobject_cast<Qt4MaemoDeployConfiguration *>(parent->parent()))
|
||||
return ids;
|
||||
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
|
||||
if (MaddeDevice::isDebianBased(deviceType)
|
||||
&& !parent->contains(MaemoDebianPackageCreationStep::CreatePackageId))
|
||||
if (!parent->contains(MaemoDebianPackageCreationStep::CreatePackageId))
|
||||
ids << MaemoDebianPackageCreationStep::CreatePackageId;
|
||||
else if (!MaddeDevice::isDebianBased(deviceType)
|
||||
&& !parent->contains(MaemoRpmPackageCreationStep::CreatePackageId))
|
||||
ids << MaemoRpmPackageCreationStep::CreatePackageId;
|
||||
return ids;
|
||||
}
|
||||
|
||||
@@ -76,9 +72,6 @@ QString MaemoPackageCreationFactory::displayNameForId(const Core::Id id) const
|
||||
if (id == MaemoDebianPackageCreationStep::CreatePackageId) {
|
||||
return QCoreApplication::translate("RemoteLinux::Internal::MaemoPackageCreationFactory",
|
||||
"Create Debian Package");
|
||||
} else if (id == MaemoRpmPackageCreationStep::CreatePackageId) {
|
||||
return QCoreApplication::translate("RemoteLinux::Internal::MaemoPackageCreationFactory",
|
||||
"Create RPM Package");
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
@@ -93,8 +86,6 @@ BuildStep *MaemoPackageCreationFactory::create(ProjectExplorer::BuildStepList *p
|
||||
Q_ASSERT(canCreate(parent, id));
|
||||
if (id == MaemoDebianPackageCreationStep::CreatePackageId)
|
||||
return new MaemoDebianPackageCreationStep(parent);
|
||||
else if (id == MaemoRpmPackageCreationStep::CreatePackageId)
|
||||
return new MaemoRpmPackageCreationStep(parent);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -110,19 +101,10 @@ BuildStep *MaemoPackageCreationFactory::restore(ProjectExplorer::BuildStepList *
|
||||
{
|
||||
Q_ASSERT(canRestore(parent, map));
|
||||
BuildStep * step = 0;
|
||||
Core::Id deviceType
|
||||
= ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
|
||||
const Core::Id id = ProjectExplorer::idFromMap(map);
|
||||
if (id == MaemoDebianPackageCreationStep::CreatePackageId
|
||||
|| (id == Core::Id(OldCreatePackageId)
|
||||
&& MaddeDevice::isDebianBased(deviceType))) {
|
||||
if (id == MaemoDebianPackageCreationStep::CreatePackageId)
|
||||
step = new MaemoDebianPackageCreationStep(parent);
|
||||
} else if (id == MaemoRpmPackageCreationStep::CreatePackageId
|
||||
|| (id == Core::Id(OldCreatePackageId)
|
||||
&& !MaddeDevice::isDebianBased(deviceType))) {
|
||||
step = new MaemoRpmPackageCreationStep(parent);
|
||||
}
|
||||
Q_ASSERT(step);
|
||||
QTC_ASSERT(step, return 0);
|
||||
|
||||
if (!step->fromMap(map)) {
|
||||
delete step;
|
||||
@@ -145,10 +127,6 @@ BuildStep *MaemoPackageCreationFactory::clone(ProjectExplorer::BuildStepList *pa
|
||||
= qobject_cast<MaemoDebianPackageCreationStep *>(product)) {
|
||||
return new MaemoDebianPackageCreationStep(parent, debianStep);
|
||||
}
|
||||
if (MaemoRpmPackageCreationStep * const rpmStep
|
||||
= qobject_cast<MaemoRpmPackageCreationStep *>(product)) {
|
||||
return new MaemoRpmPackageCreationStep(parent, rpmStep);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "maemoconstants.h"
|
||||
#include "maemoglobal.h"
|
||||
#include "debianmanager.h"
|
||||
#include "rpmmanager.h"
|
||||
#include "maemopackagecreationwidget.h"
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
@@ -479,69 +478,5 @@ bool MaemoDebianPackageCreationStep::adaptRulesFile(
|
||||
return true;
|
||||
}
|
||||
|
||||
/////////////////
|
||||
// MaemoRpmPackageCreationStep
|
||||
/////////////////
|
||||
|
||||
MaemoRpmPackageCreationStep::MaemoRpmPackageCreationStep(BuildStepList *bsl)
|
||||
: AbstractMaemoPackageCreationStep(bsl, CreatePackageId)
|
||||
{
|
||||
ctor();
|
||||
}
|
||||
|
||||
MaemoRpmPackageCreationStep::MaemoRpmPackageCreationStep(BuildStepList *buildConfig,
|
||||
MaemoRpmPackageCreationStep *other)
|
||||
: AbstractMaemoPackageCreationStep(buildConfig, other)
|
||||
{
|
||||
ctor();
|
||||
}
|
||||
|
||||
void MaemoRpmPackageCreationStep::ctor()
|
||||
{
|
||||
setDefaultDisplayName(tr("Create RPM Package"));
|
||||
}
|
||||
|
||||
bool MaemoRpmPackageCreationStep::init()
|
||||
{
|
||||
m_specFile = RpmManager::specFile(target());
|
||||
m_packageFileName = RpmManager::packageFileName(m_specFile, target());
|
||||
return AbstractMaemoPackageCreationStep::init();
|
||||
}
|
||||
|
||||
bool MaemoRpmPackageCreationStep::createPackage(QProcess *buildProc,
|
||||
const QFutureInterface<bool> &fi)
|
||||
{
|
||||
Q_UNUSED(fi);
|
||||
const QStringList args = QStringList() << QLatin1String("rrpmbuild")
|
||||
<< QLatin1String("-bb") << m_specFile.toString();
|
||||
if (!callPackagingCommand(buildProc, args))
|
||||
return false;
|
||||
QFile::remove(cachedPackageFilePath());
|
||||
const QString packageSourceFilePath = rpmBuildDir() + QLatin1Char('/')
|
||||
+ m_packageFileName.toString();
|
||||
if (!QFile::rename(packageSourceFilePath, cachedPackageFilePath())) {
|
||||
raiseError(tr("Packaging failed: Could not move package file from %1 to %2.")
|
||||
.arg(packageSourceFilePath, cachedPackageFilePath()));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MaemoRpmPackageCreationStep::isMetaDataNewerThan(const QDateTime &packageDate) const
|
||||
{
|
||||
QTC_ASSERT(!m_specFile.isEmpty(), return false);
|
||||
const QDateTime specFileChangeDate = m_specFile.toFileInfo().lastModified();
|
||||
return packageDate <= specFileChangeDate;
|
||||
}
|
||||
|
||||
QString MaemoRpmPackageCreationStep::rpmBuildDir() const
|
||||
{
|
||||
return cachedPackageDirectory() + QLatin1String("/rrpmbuild");
|
||||
}
|
||||
|
||||
const Core::Id MaemoRpmPackageCreationStep::CreatePackageId
|
||||
= Core::Id("MaemoRpmPackageCreationStep");
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
|
||||
@@ -45,9 +45,6 @@ namespace RemoteLinux { class RemoteLinuxDeployConfiguration; }
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
class AbstractQt4MaemoTarget;
|
||||
class AbstractDebBasedQt4MaemoTarget;
|
||||
class AbstractRpmBasedQt4MaemoTarget;
|
||||
|
||||
class AbstractMaemoPackageCreationStep : public RemoteLinux::AbstractPackagingStep
|
||||
{
|
||||
@@ -130,30 +127,6 @@ private:
|
||||
static const Core::Id CreatePackageId;
|
||||
};
|
||||
|
||||
class MaemoRpmPackageCreationStep : public AbstractMaemoPackageCreationStep
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class MaemoPackageCreationFactory;
|
||||
public:
|
||||
MaemoRpmPackageCreationStep(ProjectExplorer::BuildStepList *bsl);
|
||||
|
||||
private:
|
||||
bool init();
|
||||
virtual bool createPackage(QProcess *buildProc, const QFutureInterface<bool> &fi);
|
||||
virtual bool isMetaDataNewerThan(const QDateTime &packageDate) const;
|
||||
|
||||
MaemoRpmPackageCreationStep(ProjectExplorer::BuildStepList *buildConfig,
|
||||
MaemoRpmPackageCreationStep *other);
|
||||
|
||||
void ctor();
|
||||
QString rpmBuildDir() const;
|
||||
|
||||
Utils::FileName m_specFile;
|
||||
Utils::FileName m_packageFileName;
|
||||
|
||||
static const Core::Id CreatePackageId;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "maddedevice.h"
|
||||
#include "maemoglobal.h"
|
||||
#include "maemopackagecreationstep.h"
|
||||
#include "rpmmanager.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <projectexplorer/profileinformation.h>
|
||||
@@ -53,7 +52,6 @@ using namespace ProjectExplorer;
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
|
||||
// TODO: Split up into dedicated widgets for Debian and RPM steps.
|
||||
MaemoPackageCreationWidget::MaemoPackageCreationWidget(AbstractMaemoPackageCreationStep *step)
|
||||
: ProjectExplorer::BuildStepConfigWidget(),
|
||||
m_step(step),
|
||||
@@ -74,7 +72,6 @@ void MaemoPackageCreationWidget::initGui()
|
||||
m_ui->shortDescriptionLineEdit->setMaxLength(60);
|
||||
updateVersionInfo();
|
||||
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(m_step->target()->profile());
|
||||
if (MaddeDevice::isDebianBased(deviceType)) {
|
||||
const Utils::FileName path = DebianManager::debianDirectory(m_step->target());
|
||||
const QSize iconSize = MaddeDevice::packageManagerIconSize(deviceType);
|
||||
m_ui->packageManagerIconButton->setFixedSize(iconSize);
|
||||
@@ -92,29 +89,7 @@ void MaemoPackageCreationWidget::initGui()
|
||||
SLOT(updateVersionInfo()));
|
||||
connect(dm, SIGNAL(controlChanged(Utils::FileName)),
|
||||
SLOT(handleControlFileUpdate(Utils::FileName)));
|
||||
} else {
|
||||
const Utils::FileName path = RpmManager::specFile(m_step->target());
|
||||
m_ui->packageManagerNameLabel->hide();
|
||||
m_ui->packageManagerNameLineEdit->hide();
|
||||
m_ui->packageManagerIconLabel->hide();
|
||||
m_ui->packageManagerIconButton->hide();
|
||||
m_ui->editDebianFileLabel->hide();
|
||||
m_ui->debianFilesComboBox->hide();
|
||||
m_ui->editDebianFileButton->hide();
|
||||
|
||||
// This is fragile; be careful when editing the UI file.
|
||||
m_ui->formLayout->removeItem(m_ui->formLayout->itemAt(4, QFormLayout::LabelRole));
|
||||
m_ui->formLayout->removeItem(m_ui->formLayout->itemAt(4, QFormLayout::FieldRole));
|
||||
m_ui->formLayout->removeItem(m_ui->formLayout->itemAt(5, QFormLayout::LabelRole));
|
||||
m_ui->formLayout->removeItem(m_ui->formLayout->itemAt(5, QFormLayout::FieldRole));
|
||||
m_ui->formLayout->removeItem(m_ui->formLayout->itemAt(6, QFormLayout::LabelRole));
|
||||
m_ui->formLayout->removeItem(m_ui->formLayout->itemAt(6, QFormLayout::FieldRole));
|
||||
handleSpecFileUpdate(path);
|
||||
connect(RpmManager::instance(), SIGNAL(specFileChanged(Utils::FileName)),
|
||||
SLOT(handleSpecFileUpdate(Utils::FileName)));
|
||||
connect(m_ui->editSpecFileButton, SIGNAL(clicked()),
|
||||
SLOT(editSpecFile()));
|
||||
}
|
||||
connect(m_step, SIGNAL(packageFilePathChanged()), this,
|
||||
SIGNAL(updateSummary()));
|
||||
connect(m_ui->packageNameLineEdit, SIGNAL(editingFinished()),
|
||||
@@ -172,17 +147,6 @@ void MaemoPackageCreationWidget::handleControlFileUpdate(const Utils::FileName &
|
||||
updateSummary();
|
||||
}
|
||||
|
||||
void MaemoPackageCreationWidget::handleSpecFileUpdate(const Utils::FileName &spec)
|
||||
{
|
||||
if (spec != RpmManager::specFile(m_step->target()))
|
||||
return;
|
||||
|
||||
updatePackageName();
|
||||
updateShortDescription();
|
||||
updateVersionInfo();
|
||||
updateSummary();
|
||||
}
|
||||
|
||||
void MaemoPackageCreationWidget::updatePackageManagerIcon()
|
||||
{
|
||||
const Utils::FileName path = DebianManager::debianDirectory(m_step->target());
|
||||
@@ -297,11 +261,6 @@ void MaemoPackageCreationWidget::editDebianFile()
|
||||
editFile(path.toString());
|
||||
}
|
||||
|
||||
void MaemoPackageCreationWidget::editSpecFile()
|
||||
{
|
||||
editFile(RpmManager::specFile(m_step->target()).toString());
|
||||
}
|
||||
|
||||
void MaemoPackageCreationWidget::editFile(const QString &filePath)
|
||||
{
|
||||
Core::EditorManager::openEditor(filePath, Core::Id(),
|
||||
|
||||
@@ -52,13 +52,11 @@ public:
|
||||
|
||||
private slots:
|
||||
void editDebianFile();
|
||||
void editSpecFile();
|
||||
void versionInfoChanged();
|
||||
void initGui();
|
||||
void updateDebianFileList(const Utils::FileName &debianDir);
|
||||
void updateVersionInfo();
|
||||
void handleControlFileUpdate(const Utils::FileName &debianDir);
|
||||
void handleSpecFileUpdate(const Utils::FileName &spec);
|
||||
void setPackageManagerIcon();
|
||||
void setPackageManagerName();
|
||||
void setPackageName();
|
||||
|
||||
@@ -73,28 +73,6 @@ QString MaemoDebianPackageInstaller::errorString() const
|
||||
}
|
||||
|
||||
|
||||
MaemoRpmPackageInstaller::MaemoRpmPackageInstaller(QObject *parent)
|
||||
: AbstractRemoteLinuxPackageInstaller(parent)
|
||||
{
|
||||
}
|
||||
|
||||
QString MaemoRpmPackageInstaller::installCommandLine(const QString &packageFilePath) const
|
||||
{
|
||||
// rpm -U does not allow to re-install a package with the same version
|
||||
// number, so we need --replacepkgs. Even then, it inexplicably reports
|
||||
// a conflict if the files are not identical to the installed version,
|
||||
// so we need --replacefiles as well.
|
||||
// TODO: --replacefiles is dangerous. Is there perhaps a way around it
|
||||
// after all?
|
||||
return MaemoGlobal::devrootshPath() + QLatin1String(" rpm -Uhv --replacepkgs --replacefiles ")
|
||||
+ packageFilePath;
|
||||
}
|
||||
|
||||
QString MaemoRpmPackageInstaller::cancelInstallationCommandLine() const
|
||||
{
|
||||
return QLatin1String("pkill rpm");
|
||||
}
|
||||
|
||||
HarmattanPackageInstaller::HarmattanPackageInstaller(QObject *parent)
|
||||
: AbstractRemoteLinuxPackageInstaller(parent)
|
||||
{
|
||||
|
||||
@@ -55,18 +55,6 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class MaemoRpmPackageInstaller : public RemoteLinux::AbstractRemoteLinuxPackageInstaller
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MaemoRpmPackageInstaller(QObject *parent);
|
||||
|
||||
private:
|
||||
QString installCommandLine(const QString &packageFilePath) const;
|
||||
QString cancelInstallationCommandLine() const;
|
||||
};
|
||||
|
||||
|
||||
class HarmattanPackageInstaller: public RemoteLinux::AbstractRemoteLinuxPackageInstaller
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -110,10 +110,6 @@ QList<ProjectExplorer::Abi> MaemoQtVersion::detectQtAbis() const
|
||||
ProjectExplorer::Abi::HarmattanLinuxFlavor,
|
||||
ProjectExplorer::Abi::ElfFormat,
|
||||
32));
|
||||
} else if (m_deviceType == Core::Id(MeeGoOsType)) {
|
||||
result.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture, ProjectExplorer::Abi::LinuxOS,
|
||||
ProjectExplorer::Abi::MeegoLinuxFlavor,
|
||||
ProjectExplorer::Abi::ElfFormat, 32));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -124,8 +120,6 @@ QString MaemoQtVersion::description() const
|
||||
return QCoreApplication::translate("QtVersion", "Maemo", "Qt Version is meant for Maemo5");
|
||||
else if (m_deviceType == Core::Id(HarmattanOsType))
|
||||
return QCoreApplication::translate("QtVersion", "Harmattan ", "Qt Version is meant for Harmattan");
|
||||
else if (m_deviceType == Core::Id(MeeGoOsType))
|
||||
return QCoreApplication::translate("QtVersion", "MeeGo", "Qt Version is meant for MeeGo");
|
||||
return QString();
|
||||
}
|
||||
|
||||
@@ -159,8 +153,6 @@ QString MaemoQtVersion::platformName() const
|
||||
{
|
||||
if (m_deviceType == Maemo5OsType)
|
||||
return QLatin1String(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM);
|
||||
if (m_deviceType == MeeGoOsType)
|
||||
return QLatin1String(QtSupport::Constants::MEEGO_PLATFORM);
|
||||
return QLatin1String(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM);
|
||||
}
|
||||
|
||||
@@ -168,8 +160,6 @@ QString MaemoQtVersion::platformDisplayName() const
|
||||
{
|
||||
if (m_deviceType == Maemo5OsType)
|
||||
return QLatin1String(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM_TR);
|
||||
if (m_deviceType == MeeGoOsType)
|
||||
return QLatin1String(QtSupport::Constants::MEEGO_PLATFORM_TR);
|
||||
return QLatin1String(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM_TR);
|
||||
}
|
||||
|
||||
|
||||
@@ -80,9 +80,9 @@ QtSupport::BaseQtVersion *MaemoQtVersionFactory::create(const Utils::FileName &q
|
||||
|
||||
QString qmakePath = qmakeCommand.toString();
|
||||
if (MaemoGlobal::isValidMaemo5QtVersion(qmakePath)
|
||||
|| MaemoGlobal::isValidHarmattanQtVersion(qmakePath)
|
||||
|| MaemoGlobal::isValidMeegoQtVersion(qmakePath))
|
||||
|| MaemoGlobal::isValidHarmattanQtVersion(qmakePath)) {
|
||||
return new MaemoQtVersion(qmakeCommand, isAutoDetected, autoDetectionSource);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,13 +51,13 @@ MaemoRemoteCopyFacility::MaemoRemoteCopyFacility(QObject *parent) :
|
||||
MaemoRemoteCopyFacility::~MaemoRemoteCopyFacility() {}
|
||||
|
||||
void MaemoRemoteCopyFacility::copyFiles(SshConnection *connection,
|
||||
const IDevice::ConstPtr &devConf,
|
||||
const IDevice::ConstPtr &device,
|
||||
const QList<DeployableFile> &deployables, const QString &mountPoint)
|
||||
{
|
||||
Q_ASSERT(connection->state() == SshConnection::Connected);
|
||||
Q_ASSERT(!m_isCopying);
|
||||
|
||||
m_devConf = devConf;
|
||||
m_devConf = device;
|
||||
m_deployables = deployables;
|
||||
m_mountPoint = mountPoint;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
~MaemoRemoteCopyFacility();
|
||||
|
||||
void copyFiles(QSsh::SshConnection *connection,
|
||||
const ProjectExplorer::IDevice::ConstPtr &devConf,
|
||||
const ProjectExplorer::IDevice::ConstPtr &device,
|
||||
const QList<RemoteLinux::DeployableFile> &deployables, const QString &mountPoint);
|
||||
void cancel();
|
||||
|
||||
|
||||
@@ -33,8 +33,9 @@
|
||||
#include "maemoglobal.h"
|
||||
#include "maddedevice.h"
|
||||
|
||||
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||
#include <ssh/sshconnection.h>
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
#include <remotelinux/remotelinuxusedportsgatherer.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QTimer>
|
||||
@@ -52,7 +53,7 @@ MaemoRemoteMounter::MaemoRemoteMounter(QObject *parent)
|
||||
m_utfsServerTimer(new QTimer(this)),
|
||||
m_mountProcess(new SshRemoteProcessRunner(this)),
|
||||
m_unmountProcess(new SshRemoteProcessRunner(this)),
|
||||
m_portsGatherer(new RemoteLinuxUsedPortsGatherer(this)),
|
||||
m_portsGatherer(new DeviceUsedPortsGatherer(this)),
|
||||
m_state(Inactive)
|
||||
{
|
||||
connect(m_utfsServerTimer, SIGNAL(timeout()), SLOT(handleUtfsServerTimeout()));
|
||||
|
||||
@@ -45,8 +45,7 @@
|
||||
QT_FORWARD_DECLARE_CLASS(QTimer)
|
||||
|
||||
namespace QSsh { class SshRemoteProcessRunner; }
|
||||
|
||||
namespace RemoteLinux { class RemoteLinuxUsedPortsGatherer; }
|
||||
namespace ProjectExplorer { class DeviceUsedPortsGatherer; }
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
@@ -54,12 +53,13 @@ namespace Internal {
|
||||
class MaemoRemoteMounter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MaemoRemoteMounter(QObject *parent = 0);
|
||||
~MaemoRemoteMounter();
|
||||
|
||||
void setParameters(const ProjectExplorer::IDevice::ConstPtr &devConf,
|
||||
const Utils::FileName &fileName);
|
||||
const Utils::FileName &maddeRoot);
|
||||
void addMountSpecification(const MaemoMountSpecification &mountSpec,
|
||||
bool mountAsRoot);
|
||||
bool hasValidMountSpecifications() const;
|
||||
@@ -120,7 +120,7 @@ private:
|
||||
typedef QSharedPointer<QProcess> ProcPtr;
|
||||
QList<ProcPtr> m_utfsServers;
|
||||
|
||||
RemoteLinux::RemoteLinuxUsedPortsGatherer * const m_portsGatherer;
|
||||
ProjectExplorer::DeviceUsedPortsGatherer *m_portsGatherer;
|
||||
Utils::FileName m_maddeRoot;
|
||||
|
||||
State m_state;
|
||||
|
||||
@@ -123,9 +123,7 @@ QString MaemoRunConfiguration::commandPrefix() const
|
||||
if (!dev)
|
||||
return QString();
|
||||
|
||||
QString prefix = environmentPreparationCommand() + QLatin1Char(';');
|
||||
if (dev->type() == Core::Id(MeeGoOsType))
|
||||
prefix += QLatin1String("DISPLAY=:0.0 ");
|
||||
const QString prefix = environmentPreparationCommand() + QLatin1Char(';');
|
||||
|
||||
return QString::fromLatin1("%1 %2").arg(prefix, userEnvironmentChangesAsString());
|
||||
}
|
||||
@@ -135,32 +133,6 @@ Utils::PortList MaemoRunConfiguration::freePorts() const
|
||||
return MaemoGlobal::freePorts(target()->profile());
|
||||
}
|
||||
|
||||
QString MaemoRunConfiguration::localDirToMountForRemoteGdb() const
|
||||
{
|
||||
const QString projectDir
|
||||
= QDir::fromNativeSeparators(QDir::cleanPath(activeBuildConfiguration()
|
||||
->target()->project()->projectDirectory()));
|
||||
const QString execDir
|
||||
= QDir::fromNativeSeparators(QFileInfo(localExecutableFilePath()).path());
|
||||
const int length = qMin(projectDir.length(), execDir.length());
|
||||
int lastSeparatorPos = 0;
|
||||
for (int i = 0; i < length; ++i) {
|
||||
if (projectDir.at(i) != execDir.at(i))
|
||||
return projectDir.left(lastSeparatorPos);
|
||||
if (projectDir.at(i) == QLatin1Char('/'))
|
||||
lastSeparatorPos = i;
|
||||
}
|
||||
return projectDir.length() == execDir.length()
|
||||
? projectDir : projectDir.left(lastSeparatorPos);
|
||||
}
|
||||
|
||||
QString MaemoRunConfiguration::remoteProjectSourcesMountPoint() const
|
||||
{
|
||||
return MaemoGlobal::homeDirOnDevice(DeviceProfileInformation::device(target()->profile())->sshParameters().userName)
|
||||
+ QLatin1String("/gdbSourcesDir_")
|
||||
+ QFileInfo(localExecutableFilePath()).fileName();
|
||||
}
|
||||
|
||||
bool MaemoRunConfiguration::hasEnoughFreePorts(RunMode mode) const
|
||||
{
|
||||
const int freePortCount = freePorts().count();
|
||||
|
||||
@@ -53,8 +53,6 @@ public:
|
||||
|
||||
Internal::MaemoRemoteMountsModel *remoteMounts() const { return m_remoteMounts; }
|
||||
bool hasEnoughFreePorts(ProjectExplorer::RunMode mode) const;
|
||||
QString localDirToMountForRemoteGdb() const;
|
||||
QString remoteProjectSourcesMountPoint() const;
|
||||
|
||||
signals:
|
||||
void remoteMountsChanged();
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "maemoruncontrol.h"
|
||||
|
||||
#include "maemoglobal.h"
|
||||
#include "maemorunconfiguration.h"
|
||||
#include "maemosshrunner.h"
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
|
||||
using namespace RemoteLinux;
|
||||
using ProjectExplorer::RunConfiguration;
|
||||
|
||||
MaemoRunControl::MaemoRunControl(RunConfiguration *rc)
|
||||
: AbstractRemoteLinuxRunControl(rc)
|
||||
, m_runner(new MaemoSshRunner(this, qobject_cast<MaemoRunConfiguration *>(rc)))
|
||||
{
|
||||
}
|
||||
|
||||
MaemoRunControl::~MaemoRunControl()
|
||||
{
|
||||
}
|
||||
|
||||
void MaemoRunControl::start()
|
||||
{
|
||||
AbstractRemoteLinuxRunControl::start();
|
||||
connect(m_runner, SIGNAL(mountDebugOutput(QString)), SLOT(handleMountDebugOutput(QString)));
|
||||
}
|
||||
|
||||
void MaemoRunControl::handleMountDebugOutput(const QString &output)
|
||||
{
|
||||
appendMessage(output, Utils::StdErrFormatSameLine);
|
||||
}
|
||||
|
||||
AbstractRemoteLinuxApplicationRunner *MaemoRunControl::runner() const { return m_runner; }
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
@@ -1,64 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef MAEMORUNCONTROL_H
|
||||
#define MAEMORUNCONTROL_H
|
||||
|
||||
#include <remotelinux/remotelinuxruncontrol.h>
|
||||
|
||||
namespace RemoteLinux {
|
||||
class RemoteLinuxRunConfiguration;
|
||||
}
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
class MaemoSshRunner;
|
||||
|
||||
class MaemoRunControl : public RemoteLinux::AbstractRemoteLinuxRunControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MaemoRunControl(ProjectExplorer::RunConfiguration *runConfig);
|
||||
virtual ~MaemoRunControl();
|
||||
|
||||
void start();
|
||||
|
||||
private slots:
|
||||
void handleMountDebugOutput(const QString &output);
|
||||
|
||||
private:
|
||||
virtual RemoteLinux::AbstractRemoteLinuxApplicationRunner *runner() const;
|
||||
|
||||
MaemoSshRunner * const m_runner;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
|
||||
#endif // MAEMORUNCONTROL_H
|
||||
@@ -28,11 +28,11 @@
|
||||
**************************************************************************/
|
||||
#include "maemorunfactories.h"
|
||||
|
||||
#include "maemoapplicationrunnerhelperactions.h"
|
||||
#include "maemoconstants.h"
|
||||
#include "maemodebugsupport.h"
|
||||
#include "maemoglobal.h"
|
||||
#include "maemoremotemountsmodel.h"
|
||||
#include "maemorunconfiguration.h"
|
||||
#include "maemoruncontrol.h"
|
||||
|
||||
#include <debugger/debuggerconstants.h>
|
||||
#include <debugger/debuggerstartparameters.h>
|
||||
@@ -44,6 +44,8 @@
|
||||
#include <qt4projectmanager/qt4nodes.h>
|
||||
#include <qt4projectmanager/qt4project.h>
|
||||
#include <qtsupport/customexecutablerunconfiguration.h>
|
||||
#include <remotelinux/remotelinuxdebugsupport.h>
|
||||
#include <remotelinux/remotelinuxruncontrol.h>
|
||||
|
||||
using namespace Debugger;
|
||||
using namespace ProjectExplorer;
|
||||
@@ -155,8 +157,7 @@ bool MaemoRunConfigurationFactory::canHandle(Target *t) const
|
||||
if (!qobject_cast<Qt4Project *>(t->project()))
|
||||
return false;
|
||||
Core::Id devType = DeviceTypeProfileInformation::deviceTypeId(t->profile());
|
||||
return devType == Core::Id(Maemo5OsType) || devType == Core::Id(HarmattanOsType)
|
||||
|| devType == Core::Id(MeeGoOsType);
|
||||
return devType == Core::Id(Maemo5OsType) || devType == Core::Id(HarmattanOsType);
|
||||
}
|
||||
|
||||
QList<RunConfiguration *> MaemoRunConfigurationFactory::runConfigurationsForNode(Target *t, Node *n)
|
||||
@@ -169,7 +170,6 @@ QList<RunConfiguration *> MaemoRunConfigurationFactory::runConfigurationsForNode
|
||||
return result;
|
||||
}
|
||||
|
||||
// #pragma mark -- MaemoRunControlFactory
|
||||
|
||||
MaemoRunControlFactory::MaemoRunControlFactory(QObject *parent)
|
||||
: IRunControlFactory(parent)
|
||||
@@ -197,14 +197,21 @@ RunControl* MaemoRunControlFactory::create(RunConfiguration *runConfig, RunMode
|
||||
Q_ASSERT(rc);
|
||||
|
||||
if (mode == NormalRunMode)
|
||||
return new MaemoRunControl(rc);
|
||||
return new RemoteLinuxRunControl(rc);
|
||||
|
||||
const DebuggerStartParameters params
|
||||
= AbstractRemoteLinuxDebugSupport::startParameters(rc);
|
||||
const DebuggerStartParameters params = LinuxDeviceDebugSupport::startParameters(rc);
|
||||
DebuggerRunControl * const runControl = DebuggerPlugin::createDebugger(params, rc);
|
||||
if (!runControl)
|
||||
return 0;
|
||||
MaemoDebugSupport *debugSupport = new MaemoDebugSupport(rc, runControl->engine());
|
||||
LinuxDeviceDebugSupport * const debugSupport
|
||||
= new LinuxDeviceDebugSupport(rc, runControl->engine());
|
||||
const Profile * const profile = runConfig->target()->profile();
|
||||
MaemoPreRunAction * const preRunAction = new MaemoPreRunAction(
|
||||
DeviceProfileInformation::device(profile), MaemoGlobal::maddeRoot(profile),
|
||||
rc->remoteMounts()->mountSpecs(), rc);
|
||||
MaemoPostRunAction * const postRunAction = new MaemoPostRunAction(preRunAction->mounter(), rc);
|
||||
debugSupport->setApplicationRunnerPreRunAction(preRunAction);
|
||||
debugSupport->setApplicationRunnerPostRunAction(postRunAction);
|
||||
connect(runControl, SIGNAL(finished()), debugSupport, SLOT(handleDebuggingFinished()));
|
||||
return runControl;
|
||||
}
|
||||
|
||||
@@ -1,215 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
#include "maemosshrunner.h"
|
||||
|
||||
#include "maemoglobal.h"
|
||||
#include "maemoqemumanager.h"
|
||||
#include "maemoremotemounter.h"
|
||||
#include "maemoremotemountsmodel.h"
|
||||
#include "maemorunconfiguration.h"
|
||||
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <qtsupport/qtprofileinformation.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <ssh/sshconnection.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace QSsh;
|
||||
using namespace RemoteLinux;
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
|
||||
MaemoSshRunner::MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig)
|
||||
: AbstractRemoteLinuxApplicationRunner(runConfig, parent),
|
||||
m_mounter(new MaemoRemoteMounter(this)),
|
||||
m_mountSpecs(runConfig->remoteMounts()->mountSpecs()),
|
||||
m_mountState(InactiveMountState)
|
||||
{
|
||||
const BuildConfiguration * const bc = runConfig->target()->activeBuildConfiguration();
|
||||
Profile *profile = bc ? bc->target()->profile() : 0;
|
||||
m_qtId = QtSupport::QtProfileInformation::qtVersionId(profile);
|
||||
m_mounter->setParameters(devConfig(), MaemoGlobal::maddeRoot(profile));
|
||||
connect(m_mounter, SIGNAL(mounted()), this, SLOT(handleMounted()));
|
||||
connect(m_mounter, SIGNAL(unmounted()), this, SLOT(handleUnmounted()));
|
||||
connect(m_mounter, SIGNAL(error(QString)), this,
|
||||
SLOT(handleMounterError(QString)));
|
||||
connect(m_mounter, SIGNAL(reportProgress(QString)), this,
|
||||
SIGNAL(reportProgress(QString)));
|
||||
connect(m_mounter, SIGNAL(debugOutput(QString)), this,
|
||||
SIGNAL(mountDebugOutput(QString)));
|
||||
}
|
||||
|
||||
bool MaemoSshRunner::canRun(QString &whyNot) const
|
||||
{
|
||||
if (!AbstractRemoteLinuxApplicationRunner::canRun(whyNot))
|
||||
return false;
|
||||
|
||||
if (devConfig()->machineType() == IDevice::Emulator
|
||||
&& !MaemoQemuManager::instance().qemuIsRunning()) {
|
||||
MaemoQemuRuntime rt;
|
||||
if (MaemoQemuManager::instance().runtimeForQtVersion(m_qtId, &rt)) {
|
||||
MaemoQemuManager::instance().startRuntime();
|
||||
whyNot = tr("Qemu was not running. It has now been started up for you, but it will "
|
||||
"take a bit of time until it is ready. Please try again then.");
|
||||
} else {
|
||||
whyNot = tr("You want to run on Qemu, but it is not enabled for this Qt version.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void MaemoSshRunner::doDeviceSetup()
|
||||
{
|
||||
QTC_ASSERT(m_mountState == InactiveMountState, return);
|
||||
|
||||
handleDeviceSetupDone(true);
|
||||
}
|
||||
|
||||
void MaemoSshRunner::doAdditionalInitialCleanup()
|
||||
{
|
||||
QTC_ASSERT(m_mountState == InactiveMountState, return);
|
||||
|
||||
m_mounter->resetMountSpecifications();
|
||||
for (int i = 0; i < m_mountSpecs.count(); ++i)
|
||||
m_mounter->addMountSpecification(m_mountSpecs.at(i), false);
|
||||
m_mountState = InitialUnmounting;
|
||||
unmount();
|
||||
}
|
||||
|
||||
void MaemoSshRunner::doAdditionalInitializations()
|
||||
{
|
||||
mount();
|
||||
}
|
||||
|
||||
void MaemoSshRunner::doPostRunCleanup()
|
||||
{
|
||||
QTC_ASSERT(m_mountState == Mounted, return);
|
||||
|
||||
m_mountState = PostRunUnmounting;
|
||||
unmount();
|
||||
}
|
||||
|
||||
void MaemoSshRunner::handleUnmounted()
|
||||
{
|
||||
QTC_ASSERT(m_mountState == InitialUnmounting || m_mountState == PostRunUnmounting, return);
|
||||
|
||||
switch (m_mountState) {
|
||||
case InitialUnmounting:
|
||||
m_mountState = InactiveMountState;
|
||||
handleInitialCleanupDone(true);
|
||||
break;
|
||||
case PostRunUnmounting:
|
||||
m_mountState = InactiveMountState;
|
||||
handlePostRunCleanupDone();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
m_mountState = InactiveMountState;
|
||||
}
|
||||
|
||||
void MaemoSshRunner::doAdditionalConnectionErrorHandling()
|
||||
{
|
||||
m_mountState = InactiveMountState;
|
||||
}
|
||||
|
||||
void MaemoSshRunner::handleMounted()
|
||||
{
|
||||
QTC_ASSERT(m_mountState == Mounting, return);
|
||||
|
||||
if (m_mountState == Mounting) {
|
||||
m_mountState = Mounted;
|
||||
handleInitializationsDone(true);
|
||||
}
|
||||
}
|
||||
|
||||
void MaemoSshRunner::handleMounterError(const QString &errorMsg)
|
||||
{
|
||||
QTC_ASSERT(m_mountState == InitialUnmounting || m_mountState == Mounting
|
||||
|| m_mountState == PostRunUnmounting, return);
|
||||
|
||||
const MountState oldMountState = m_mountState;
|
||||
m_mountState = InactiveMountState;
|
||||
emit error(errorMsg);
|
||||
switch (oldMountState) {
|
||||
case InitialUnmounting:
|
||||
handleInitialCleanupDone(false);
|
||||
break;
|
||||
case Mounting:
|
||||
handleInitializationsDone(false);
|
||||
break;
|
||||
case PostRunUnmounting:
|
||||
handlePostRunCleanupDone();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void MaemoSshRunner::mount()
|
||||
{
|
||||
m_mountState = Mounting;
|
||||
if (m_mounter->hasValidMountSpecifications()) {
|
||||
emit reportProgress(tr("Mounting host directories..."));
|
||||
m_mounter->mount();
|
||||
} else {
|
||||
handleMounted();
|
||||
}
|
||||
}
|
||||
|
||||
void MaemoSshRunner::unmount()
|
||||
{
|
||||
QTC_ASSERT(m_mountState == InitialUnmounting || m_mountState == PostRunUnmounting, return);
|
||||
|
||||
if (m_mounter->hasValidMountSpecifications()) {
|
||||
QString message;
|
||||
switch (m_mountState) {
|
||||
case InitialUnmounting:
|
||||
message = tr("Potentially unmounting left-over host directory mounts...");
|
||||
break;
|
||||
case PostRunUnmounting:
|
||||
message = tr("Unmounting host directories...");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
emit reportProgress(message);
|
||||
m_mounter->unmount();
|
||||
} else {
|
||||
handleUnmounted();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "maemoglobal.h"
|
||||
#include "maemoinstalltosysrootstep.h"
|
||||
#include "maemopackagecreationstep.h"
|
||||
#include "rpmmanager.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
@@ -116,11 +115,6 @@ Core::Id Qt4MaemoDeployConfiguration::harmattanId()
|
||||
return Core::Id("DeployToHarmattan");
|
||||
}
|
||||
|
||||
Core::Id Qt4MaemoDeployConfiguration::meegoId()
|
||||
{
|
||||
return Core::Id("DeployToMeego");
|
||||
}
|
||||
|
||||
DeploymentSettingsAssistant *Qt4MaemoDeployConfiguration::deploymentSettingsAssistant()
|
||||
{
|
||||
return static_cast<DeploymentSettingsAssistant *>(target()->project()->namedSettings(QLatin1String(DEPLOYMENT_ASSISTANT_SETTING)).value<QObject *>());
|
||||
@@ -134,8 +128,6 @@ QString Qt4MaemoDeployConfiguration::qmakeScope() const
|
||||
return QLatin1String("maemo5");
|
||||
else if (deviceType == Core::Id(HarmattanOsType))
|
||||
return QLatin1String("contains(MEEGO_EDITION,harmattan)");
|
||||
else if (deviceType == Core::Id(MeeGoOsType))
|
||||
return QLatin1String("!isEmpty(MEEGO_VERSION_MAJOR):!contains(MEEGO_EDITION,harmattan)");
|
||||
return QString("unix");
|
||||
}
|
||||
|
||||
@@ -147,9 +139,7 @@ QString Qt4MaemoDeployConfiguration::installPrefix() const
|
||||
return QLatin1String("/opt");
|
||||
else if (deviceType == Core::Id(HarmattanOsType))
|
||||
return QLatin1String("/opt");
|
||||
else if (deviceType == Core::Id(MeeGoOsType))
|
||||
return QLatin1String("/opt");
|
||||
return QString("unix");
|
||||
return QLatin1String("/usr/local");
|
||||
}
|
||||
|
||||
void Qt4MaemoDeployConfiguration::debianDirChanged(const Utils::FileName &dir)
|
||||
@@ -164,10 +154,6 @@ void Qt4MaemoDeployConfiguration::setupPackaging()
|
||||
return;
|
||||
|
||||
disconnect(target()->project(), SIGNAL(fileListChanged()), this, SLOT(setupPackaging()));
|
||||
|
||||
if (id() == Qt4MaemoDeployConfiguration::meegoId())
|
||||
;
|
||||
else
|
||||
setupDebianPackaging();
|
||||
}
|
||||
|
||||
@@ -289,9 +275,6 @@ QList<Core::Id> Qt4MaemoDeployConfigurationFactory::availableCreationIds(Target
|
||||
<< Qt4MaemoDeployConfiguration::fremantleWithoutPackagingId();
|
||||
else if (deviceType == Core::Id(HarmattanOsType))
|
||||
ids << Qt4MaemoDeployConfiguration::harmattanId();
|
||||
else if (deviceType == Core::Id(MeeGoOsType))
|
||||
ids << Qt4MaemoDeployConfiguration::meegoId();
|
||||
|
||||
return ids;
|
||||
}
|
||||
|
||||
@@ -303,8 +286,6 @@ QString Qt4MaemoDeployConfigurationFactory::displayNameForId(const Core::Id id)
|
||||
return tr("Build Debian Package and Install to Maemo5 Device");
|
||||
else if (id == Qt4MaemoDeployConfiguration::harmattanId())
|
||||
return tr("Build Debian Package and Install to Harmattan Device");
|
||||
else if (id == Qt4MaemoDeployConfiguration::meegoId())
|
||||
return tr("Build RPM Package and Install to MeeGo Device");
|
||||
return QString();
|
||||
}
|
||||
|
||||
@@ -335,11 +316,6 @@ DeployConfiguration *Qt4MaemoDeployConfigurationFactory::create(Target *parent,
|
||||
dc->stepList()->insertStep(1, new MaemoInstallDebianPackageToSysrootStep(dc->stepList()));
|
||||
dc->stepList()->insertStep(2, new RemoteLinuxCheckForFreeDiskSpaceStep(dc->stepList()));
|
||||
dc->stepList()->insertStep(3, new MaemoUploadAndInstallPackageStep(dc->stepList()));
|
||||
} else if (id == Qt4MaemoDeployConfiguration::meegoId()) {
|
||||
dc->stepList()->insertStep(0, new MaemoRpmPackageCreationStep(dc->stepList()));
|
||||
dc->stepList()->insertStep(1, new MaemoInstallRpmPackageToSysrootStep(dc->stepList()));
|
||||
dc->stepList()->insertStep(2, new RemoteLinuxCheckForFreeDiskSpaceStep(dc->stepList()));
|
||||
dc->stepList()->insertStep(3, new MeegoUploadAndInstallPackageStep(dc->stepList()));
|
||||
}
|
||||
return dc;
|
||||
}
|
||||
@@ -363,8 +339,6 @@ DeployConfiguration *Qt4MaemoDeployConfigurationFactory::restore(Target *parent,
|
||||
id = Qt4MaemoDeployConfiguration::fremantleWithPackagingId();
|
||||
else if (deviceType == Core::Id(HarmattanOsType))
|
||||
id = Qt4MaemoDeployConfiguration::harmattanId();
|
||||
else if (deviceType == Core::Id(MeeGoOsType))
|
||||
id = Qt4MaemoDeployConfiguration::meegoId();
|
||||
}
|
||||
Qt4MaemoDeployConfiguration * const dc
|
||||
= qobject_cast<Qt4MaemoDeployConfiguration *>(create(parent, id));
|
||||
|
||||
@@ -76,7 +76,6 @@ public:
|
||||
static Core::Id fremantleWithPackagingId();
|
||||
static Core::Id fremantleWithoutPackagingId();
|
||||
static Core::Id harmattanId();
|
||||
static Core::Id meegoId();
|
||||
|
||||
RemoteLinux::DeploymentSettingsAssistant *deploymentSettingsAssistant();
|
||||
|
||||
|
||||
@@ -1,240 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "rpmmanager.h"
|
||||
|
||||
#include "maddedevice.h"
|
||||
#include "maemoconstants.h"
|
||||
#include "maemoglobal.h"
|
||||
#include "maemopackagecreationstep.h"
|
||||
|
||||
#include <coreplugin/documentmanager.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <qtsupport/qtprofileinformation.h>
|
||||
#include <utils/filesystemwatcher.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QBuffer>
|
||||
#include <QByteArray>
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
#include <QProcess>
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Helpers:
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
namespace {
|
||||
|
||||
const QLatin1String PackagingDirName("qtc_packaging");
|
||||
const QByteArray NameTag("Name");
|
||||
const QByteArray SummaryTag("Summary");
|
||||
const QByteArray VersionTag("Version");
|
||||
const QByteArray ReleaseTag("Release");
|
||||
|
||||
bool adaptTagValue(QByteArray &document, const QByteArray &fieldName,
|
||||
const QByteArray &newFieldValue, bool caseSensitive)
|
||||
{
|
||||
QByteArray adaptedLine = fieldName + ": " + newFieldValue;
|
||||
const QByteArray completeTag = fieldName + ':';
|
||||
const int lineOffset = caseSensitive ? document.indexOf(completeTag)
|
||||
: document.toLower().indexOf(completeTag.toLower());
|
||||
if (lineOffset == -1) {
|
||||
document.append(adaptedLine).append('\n');
|
||||
return true;
|
||||
}
|
||||
|
||||
int newlineOffset = document.indexOf('\n', lineOffset);
|
||||
bool updated = false;
|
||||
if (newlineOffset == -1) {
|
||||
newlineOffset = document.length();
|
||||
adaptedLine += '\n';
|
||||
updated = true;
|
||||
}
|
||||
const int replaceCount = newlineOffset - lineOffset;
|
||||
if (!updated && document.mid(lineOffset, replaceCount) != adaptedLine)
|
||||
updated = true;
|
||||
if (updated)
|
||||
document.replace(lineOffset, replaceCount, adaptedLine);
|
||||
return updated;
|
||||
}
|
||||
|
||||
QByteArray valueForTag(const Utils::FileName &spec, const QByteArray &tag, QString *error)
|
||||
{
|
||||
Utils::FileReader reader;
|
||||
if (!reader.fetch(spec.toString(), error))
|
||||
return QByteArray();
|
||||
const QByteArray &content = reader.data();
|
||||
const QByteArray completeTag = tag.toLower() + ':';
|
||||
int index = content.toLower().indexOf(completeTag);
|
||||
if (index == -1)
|
||||
return QByteArray();
|
||||
index += completeTag.count();
|
||||
int endIndex = content.indexOf('\n', index);
|
||||
if (endIndex == -1)
|
||||
endIndex = content.count();
|
||||
return content.mid(index, endIndex - index).trimmed();
|
||||
}
|
||||
|
||||
bool setValueForTag(const Utils::FileName &spec, const QByteArray &tag, const QByteArray &value, QString *error)
|
||||
{
|
||||
Utils::FileReader reader;
|
||||
if (!reader.fetch(spec.toString(), error))
|
||||
return false;
|
||||
QByteArray content = reader.data();
|
||||
if (adaptTagValue(content, tag, value, false)) {
|
||||
Utils::FileSaver saver(spec.toString());
|
||||
saver.write(content);
|
||||
return saver.finalize(error);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// RpmManager:
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
RpmManager *RpmManager::m_instance = 0;
|
||||
|
||||
RpmManager::RpmManager(QObject *parent) :
|
||||
QObject(parent),
|
||||
m_watcher(new Utils::FileSystemWatcher(this))
|
||||
{
|
||||
m_instance = this;
|
||||
|
||||
m_watcher->setObjectName("Madde::RpmManager");
|
||||
connect(m_watcher, SIGNAL(fileChanged(QString)),
|
||||
this, SLOT(specFileWasChanged(QString)));
|
||||
}
|
||||
|
||||
RpmManager::~RpmManager()
|
||||
{ }
|
||||
|
||||
RpmManager *RpmManager::instance()
|
||||
{
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
void RpmManager::monitor(const Utils::FileName &spec)
|
||||
{
|
||||
QFileInfo fi = spec.toFileInfo();
|
||||
if (!fi.isFile())
|
||||
return;
|
||||
|
||||
if (!m_watches.contains(spec)) {
|
||||
m_watches.insert(spec, 1);
|
||||
m_watcher->addFile(spec.toString(), Utils::FileSystemWatcher::WatchAllChanges);
|
||||
}
|
||||
}
|
||||
|
||||
void RpmManager::ignore(const Utils::FileName &spec)
|
||||
{
|
||||
int count = m_watches.value(spec, 0) - 1;
|
||||
if (count < 0)
|
||||
return;
|
||||
if (count > 0) {
|
||||
m_watches[spec] = 0;
|
||||
} else {
|
||||
m_watches.remove(spec);
|
||||
m_watcher->removeFile(spec.toString());
|
||||
}
|
||||
}
|
||||
|
||||
QString RpmManager::projectVersion(const Utils::FileName &spec, QString *error)
|
||||
{
|
||||
return QString::fromUtf8(valueForTag(spec, VersionTag, error));
|
||||
}
|
||||
|
||||
bool RpmManager::setProjectVersion(const Utils::FileName &spec, const QString &version, QString *error)
|
||||
{
|
||||
return setValueForTag(spec, VersionTag, version.toUtf8(), error);
|
||||
}
|
||||
|
||||
QString RpmManager::packageName(const Utils::FileName &spec)
|
||||
{
|
||||
return QString::fromUtf8(valueForTag(spec, NameTag, 0));
|
||||
}
|
||||
|
||||
bool RpmManager::setPackageName(const Utils::FileName &spec, const QString &packageName)
|
||||
{
|
||||
return setValueForTag(spec, NameTag, packageName.toUtf8(), 0);
|
||||
}
|
||||
|
||||
QString RpmManager::shortDescription(const Utils::FileName &spec)
|
||||
{
|
||||
return QString::fromUtf8(valueForTag(spec, SummaryTag, 0));
|
||||
}
|
||||
|
||||
bool RpmManager::setShortDescription(const Utils::FileName &spec, const QString &description)
|
||||
{
|
||||
return setValueForTag(spec, SummaryTag, description.toUtf8(), 0);
|
||||
}
|
||||
|
||||
Utils::FileName RpmManager::packageFileName(const Utils::FileName &spec, ProjectExplorer::Target *t)
|
||||
{
|
||||
QtSupport::BaseQtVersion *lqt = QtSupport::QtProfileInformation::qtVersion(t->profile());
|
||||
if (!lqt)
|
||||
return Utils::FileName();
|
||||
return Utils::FileName::fromString(packageName(spec)
|
||||
+ QLatin1Char('-') + projectVersion(spec)
|
||||
+ QLatin1Char('-') + QString::fromUtf8(valueForTag(spec, ReleaseTag, 0))
|
||||
+ QLatin1Char('.') + MaemoGlobal::architecture(lqt->qmakeCommand().toString())
|
||||
+ QLatin1String(".rpm"));
|
||||
}
|
||||
|
||||
Utils::FileName RpmManager::specFile(ProjectExplorer::Target *target)
|
||||
{
|
||||
Utils::FileName path = Utils::FileName::fromString(target->project()->projectDirectory());
|
||||
path.appendPath(PackagingDirName);
|
||||
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target->profile());
|
||||
if (deviceType == Core::Id(MeeGoOsType))
|
||||
path.appendPath(QLatin1String("meego.spec"));
|
||||
else
|
||||
path.clear();
|
||||
return path;
|
||||
}
|
||||
|
||||
void RpmManager::specFileWasChanged(const QString &path)
|
||||
{
|
||||
Utils::FileName fn = Utils::FileName::fromString(path);
|
||||
QTC_ASSERT(m_watches.contains(fn), return);
|
||||
emit specFileChanged(fn);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
@@ -1,90 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef RPMMANAGER_H
|
||||
#define RPMMANAGER_H
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QHash>
|
||||
|
||||
namespace Utils { class FileSystemWatcher; }
|
||||
namespace ProjectExplorer { class Target; }
|
||||
namespace Qt4ProjectManager { class Qt4BuildConfiguration; }
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
class MaddePlugin;
|
||||
|
||||
class RpmManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
~RpmManager();
|
||||
|
||||
static RpmManager *instance();
|
||||
|
||||
// ref counted:
|
||||
void monitor(const Utils::FileName &specFile);
|
||||
void ignore(const Utils::FileName &specFile);
|
||||
|
||||
static QString projectVersion(const Utils::FileName &spec, QString *error = 0);
|
||||
static bool setProjectVersion(const Utils::FileName &spec, const QString &version, QString *error = 0);
|
||||
static QString packageName(const Utils::FileName &spec);
|
||||
static bool setPackageName(const Utils::FileName &spec, const QString &packageName);
|
||||
static QString shortDescription(const Utils::FileName &spec);
|
||||
static bool setShortDescription(const Utils::FileName &spec, const QString &description);
|
||||
|
||||
static Utils::FileName packageFileName(const Utils::FileName &spec, ProjectExplorer::Target *t);
|
||||
|
||||
static Utils::FileName specFile(ProjectExplorer::Target *target);
|
||||
|
||||
signals:
|
||||
void specFileChanged(const Utils::FileName &spec);
|
||||
|
||||
private slots:
|
||||
void specFileWasChanged(const QString &path);
|
||||
|
||||
private:
|
||||
explicit RpmManager(QObject *parent = 0);
|
||||
|
||||
Utils::FileSystemWatcher *m_watcher;
|
||||
QHash<Utils::FileName, int> m_watches;
|
||||
static RpmManager *m_instance;
|
||||
|
||||
friend class MaddePlugin;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Madde
|
||||
|
||||
#endif // DEBIANMANAGER_H
|
||||
@@ -302,7 +302,7 @@ Abi::Abi(const Architecture &a, const OS &o,
|
||||
m_osFlavor = UnknownFlavor;
|
||||
break;
|
||||
case ProjectExplorer::Abi::LinuxOS:
|
||||
if (m_osFlavor < GenericLinuxFlavor || m_osFlavor > MeegoLinuxFlavor)
|
||||
if (m_osFlavor < GenericLinuxFlavor || m_osFlavor > MaemoLinuxFlavor)
|
||||
m_osFlavor = UnknownFlavor;
|
||||
break;
|
||||
case ProjectExplorer::Abi::BsdOS:
|
||||
@@ -388,8 +388,6 @@ Abi::Abi(const QString &abiString) :
|
||||
m_osFlavor = MaemoLinuxFlavor;
|
||||
else if (abiParts.at(2) == QLatin1String("harmattan") && m_os == LinuxOS)
|
||||
m_osFlavor = HarmattanLinuxFlavor;
|
||||
else if (abiParts.at(2) == QLatin1String("meego") && m_os == LinuxOS)
|
||||
m_osFlavor = MeegoLinuxFlavor;
|
||||
else if (abiParts.at(2) == QLatin1String("generic") && m_os == MacOS)
|
||||
m_osFlavor = GenericMacFlavor;
|
||||
else if (abiParts.at(2) == QLatin1String("device") && m_os == SymbianOS)
|
||||
@@ -572,8 +570,6 @@ QString Abi::toString(const OSFlavor &of)
|
||||
return QLatin1String("maemo");
|
||||
case ProjectExplorer::Abi::HarmattanLinuxFlavor:
|
||||
return QLatin1String("harmattan");
|
||||
case ProjectExplorer::Abi::MeegoLinuxFlavor:
|
||||
return QLatin1String("meego");
|
||||
case ProjectExplorer::Abi::GenericMacFlavor:
|
||||
return QLatin1String("generic");
|
||||
case ProjectExplorer::Abi::SymbianDeviceFlavor:
|
||||
@@ -633,8 +629,8 @@ QList<Abi::OSFlavor> Abi::flavorsForOs(const Abi::OS &o)
|
||||
case BsdOS:
|
||||
return result << FreeBsdFlavor << OpenBsdFlavor << NetBsdFlavor;
|
||||
case LinuxOS:
|
||||
return result << GenericLinuxFlavor << HarmattanLinuxFlavor << MaemoLinuxFlavor << MeegoLinuxFlavor
|
||||
<< AndroidLinuxFlavor;
|
||||
return result << GenericLinuxFlavor << HarmattanLinuxFlavor << MaemoLinuxFlavor
|
||||
<< AndroidLinuxFlavor;;
|
||||
case MacOS:
|
||||
return result << GenericMacFlavor;
|
||||
case SymbianOS:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user