Commit e9298826 authored by con's avatar con
Browse files

Merge remote branch 'origin/2.2'

parents 93f39956 0edee47c
......@@ -23,7 +23,7 @@
\contentspage index.html
\if defined(qcmanual)
\previouspage creator-project-generic.html
\previouspage creator-project-qmake-libraries.html
\else
\previouspage creator-developing-symbian.html
\endif
......@@ -34,7 +34,7 @@
\nextpage smartinstaller.html
\endif
\title Setting Up Development Environment for Maemo
\title Connecting Maemo Devices
Maemo 5 (Fremantle) is a software platform developed by Nokia for
smartphones. The Maemo 5 SDK provides an open development environment
......
This diff is collapsed.
......@@ -33,7 +33,7 @@
\nextpage creator-developing-maemo.html
\endif
\title Setting Up Development Environment for Symbian
\title Connecting Symbian Devices
When you install \QSDK, the build and run settings for Symbian devices
are set up automatically. You only need to connect the devices to the
......
......@@ -127,10 +127,14 @@ def lookupType(typestring):
ts = ts[9:]
elif ts.startswith("enum "):
ts = ts[5:]
elif ts.endswith("const"):
ts = ts[-5:]
elif ts.endswith("volatile"):
ts = ts[-8:]
elif ts.endswith(" const"):
ts = ts[:-6]
elif ts.endswith(" volatile"):
ts = ts[:-9]
elif ts.endswith("*const"):
ts = ts[:-5]
elif ts.endswith("*volatile"):
ts = ts[:-8]
else:
break
try:
......
......@@ -297,20 +297,24 @@ bool BuildableHelperLibrary::getHelperFileInfoFor(const QStringList &validBinary
QString BuildableHelperLibrary::byInstallDataHelper(const QString &sourcePath,
const QStringList &sourceFileNames,
const QStringList &installDirectories,
const QStringList &validBinaryFilenames)
const QStringList &validBinaryFilenames,
bool acceptOutdatedHelper)
{
// find the latest change to the sources
QDateTime sourcesModified;
foreach (const QString &sourceFileName, sourceFileNames) {
const QDateTime fileModified = QFileInfo(sourcePath + sourceFileName).lastModified();
if (fileModified.isValid() && (!sourcesModified.isValid() || fileModified > sourcesModified))
sourcesModified = fileModified;
if (!acceptOutdatedHelper) {
foreach (const QString &sourceFileName, sourceFileNames) {
const QDateTime fileModified = QFileInfo(sourcePath + sourceFileName).lastModified();
if (fileModified.isValid() && (!sourcesModified.isValid() || fileModified > sourcesModified))
sourcesModified = fileModified;
}
}
// We pretend that the lastmodified of gdbmacros.cpp is 5 minutes before what the file system says
// Because afer a installation from the package the modified dates of gdbmacros.cpp
// and the actual library are close to each other, but not deterministic in one direction
sourcesModified = sourcesModified.addSecs(-300);
if (sourcesModified.isValid())
sourcesModified = sourcesModified.addSecs(-300);
// look for the newest helper library in the different locations
QString newestHelper;
......@@ -318,7 +322,8 @@ QString BuildableHelperLibrary::byInstallDataHelper(const QString &sourcePath,
QFileInfo fileInfo;
foreach(const QString &installDirectory, installDirectories) {
if (getHelperFileInfoFor(validBinaryFilenames, installDirectory, &fileInfo)) {
if (fileInfo.lastModified() > newestHelperModified) {
if (!newestHelperModified.isValid()
|| (fileInfo.lastModified() > newestHelperModified)) {
newestHelper = fileInfo.filePath();
newestHelperModified = fileInfo.lastModified();
}
......
......@@ -61,7 +61,8 @@ public:
static QString byInstallDataHelper(const QString &sourcePath,
const QStringList &sourceFileNames,
const QStringList &installDirectories,
const QStringList &validBinaryFilenames);
const QStringList &validBinaryFilenames,
bool acceptOutdatedHelper);
static bool copyFiles(const QString &sourcePath, const QStringList &files,
const QString &targetDirectory, QString *errorMessage);
......
......@@ -336,8 +336,10 @@ QByteArray cdbWriteMemoryCommand(quint64 addr, const QByteArray &data)
str.setIntegerBase(16);
str << "f " << addr << " L" << data.size();
const int count = data.size();
for (int i = 0 ; i < count ; i++ )
str << ' ' << int(data.at(i));
for (int i = 0 ; i < count ; i++ ) {
const unsigned char uc = (unsigned char)data.at(i);
str << ' ' << unsigned(uc);
}
return cmd;
}
......
......@@ -3946,7 +3946,8 @@ void GdbEngine::changeMemory(MemoryAgent *agent, QObject *token,
QByteArray cmd = "-data-write-memory " + QByteArray::number(addr) + " d 1";
foreach (char c, data) {
cmd.append(' ');
cmd.append(QByteArray::number(uint(c)));
const unsigned char uc = (unsigned char)c;
cmd.append(QByteArray::number(uint(uc)));
}
postCommand(cmd, NeedsStop, CB(handleChangeMemory),
QVariant::fromValue(MemoryAgentCookie(agent, token, addr)));
......
......@@ -101,7 +101,7 @@ QString DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(const QStrin
const QStringList directories = DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData);
const QStringList binFilenames = validBinaryFilenames();
return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames);
return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames, false);
}
QString DebuggingHelperLibrary::copy(const QString &qtInstallData,
......
......@@ -62,7 +62,7 @@ QString QmlDebuggingLibrary::libraryByInstallData(const QString &qtInstallData,
}
binFilenames << QLatin1String("libQmlJSDebugger.a");
return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames);
return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames, false);
}
bool QmlDebuggingLibrary::canBuild(const QtVersion *qtVersion)
......
......@@ -175,14 +175,20 @@ static inline QStringList validBinaryFilenames(bool debugBuild)
return list;
}
static bool hasPrivateHeaders(const QString &qtInstallHeaders) {
const QString header = qtInstallHeaders
+ QLatin1String("/QtDeclarative/private/qdeclarativemetatype_p.h");
return QFile::exists(header);
}
bool QmlDumpTool::canBuild(const QtVersion *qtVersion)
{
const QString installHeaders = qtVersion->versionInfo().value("QT_INSTALL_HEADERS");
const QString header = installHeaders + QLatin1String("/QtDeclarative/private/qdeclarativemetatype_p.h");
return (qtVersion->supportsTargetId(Constants::DESKTOP_TARGET_ID)
|| (qtVersion->supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID)
&& (qtVersion->qtVersion() > QtVersionNumber(4, 7, 1))))
&& QFile::exists(header);
&& hasPrivateHeaders(installHeaders);
}
static QtVersion *qtVersionForProject(ProjectExplorer::Project *project)
......@@ -234,7 +240,8 @@ QString QmlDumpTool::toolForProject(ProjectExplorer::Project *project, bool debu
QtVersion *version = qtVersionForProject(project);
if (version) {
QString qtInstallData = version->versionInfo().value("QT_INSTALL_DATA");
QString toolPath = toolByInstallData(qtInstallData, debugDump);
QString qtInstallHeaders = version->versionInfo().value("QT_INSTALL_HEADERS");
QString toolPath = toolByInstallData(qtInstallData, qtInstallHeaders, debugDump);
return toolPath;
}
......@@ -258,17 +265,17 @@ static QStringList sourceFileNames()
return files;
}
QString QmlDumpTool::toolByInstallData(const QString &qtInstallData, bool debugDump)
QString QmlDumpTool::toolByInstallData(const QString &qtInstallData, const QString &qtInstallHeaders,
bool debugDump)
{
if (!Core::ICore::instance())
return QString();
const QString mainFilename = Core::ICore::instance()->resourcePath()
+ QLatin1String("/qml/qmldump/main.cpp");
const QStringList directories = installDirectories(qtInstallData);
const QStringList binFilenames = validBinaryFilenames(debugDump);
return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames);
return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames,
!hasPrivateHeaders(qtInstallHeaders));
}
QStringList QmlDumpTool::locationsByInstallData(const QString &qtInstallData, bool debugDump)
......
......@@ -53,7 +53,8 @@ class QT4PROJECTMANAGER_EXPORT QmlDumpTool : public Utils::BuildableHelperLibrar
public:
static bool canBuild(const QtVersion *qtVersion);
static QString toolForProject(ProjectExplorer::Project *project, bool debugDump);
static QString toolByInstallData(const QString &qtInstallData, bool debugDump);
static QString toolByInstallData(const QString &qtInstallData, const QString &qtInstallHeaders,
bool debugDump);
static QStringList locationsByInstallData(const QString &qtInstallData, bool debugDump);
// Build the helpers and return the output log/errormessage.
......
......@@ -86,7 +86,7 @@ QString QmlObserverTool::toolByInstallData(const QString &qtInstallData)
const QStringList directories = installDirectories(qtInstallData);
const QStringList binFilenames = validBinaryFilenames();
return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames);
return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames, false);
}
QStringList QmlObserverTool::locationsByInstallData(const QString &qtInstallData)
......
......@@ -1087,8 +1087,7 @@ QString Qt4HarmattanTarget::defaultDisplayName()
void Qt4HarmattanTarget::addAdditionalControlFileFields(QByteArray &controlContents)
{
adaptControlFileField(controlContents, "XB-Meego-Desktop-Entry", "");
adaptControlFileField(controlContents, "XB-MeeGo-Desktop-Entry-Filename", "");
Q_UNUSED(controlContents);
}
QString Qt4HarmattanTarget::debianDirName() const
......
......@@ -1271,11 +1271,14 @@ void QtVersion::updateVersionInfo() const
if (m_versionInfo.contains("QT_INSTALL_DATA")) {
QString qtInstallData = m_versionInfo.value("QT_INSTALL_DATA");
QString qtHeaderData = m_versionInfo.value("QT_INSTALL_HEADERS");
m_versionInfo.insert("QMAKE_MKSPECS", QDir::cleanPath(qtInstallData+"/mkspecs"));
if (!qtInstallData.isEmpty()) {
m_hasDebuggingHelper = !DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData).isEmpty();
m_hasQmlDump = !QmlDumpTool::toolByInstallData(qtInstallData, false).isEmpty() || !QmlDumpTool::toolByInstallData(qtInstallData, true).isEmpty();
m_hasQmlDump
= !QmlDumpTool::toolByInstallData(qtInstallData, qtHeaderData, false).isEmpty()
|| !QmlDumpTool::toolByInstallData(qtInstallData, qtHeaderData, true).isEmpty();
m_hasQmlDebuggingLibrary
= !QmlDebuggingLibrary::libraryByInstallData(qtInstallData, false).isEmpty()
|| !QmlDebuggingLibrary::libraryByInstallData(qtInstallData, true).isEmpty();
......@@ -1970,9 +1973,10 @@ QString QtVersion::gdbDebuggingHelperLibrary() const
QString QtVersion::qmlDumpTool(bool debugVersion) const
{
QString qtInstallData = versionInfo().value("QT_INSTALL_DATA");
QString qtHeaderData = versionInfo().value("QT_INSTALL_HEADERS");
if (qtInstallData.isEmpty())
return QString();
return QmlDumpTool::toolByInstallData(qtInstallData, debugVersion);
return QmlDumpTool::toolByInstallData(qtInstallData, qtHeaderData, debugVersion);
}
QString QtVersion::qmlDebuggingHelperLibrary(bool debugVersion) const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment