diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-12-02 15:33:56 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-12-02 15:33:56 +0100 |
commit | 0a893fc6b4de4dfe8da0a85b982dcf74217225b1 (patch) | |
tree | 25629833a914c2e4ba39e1391d415f104feedbd4 | |
parent | 7206a46952077892fc310e989ff9b6be9b2c26b7 (diff) | |
parent | 242cb179191c2fa5c88561b4d28b693868fbd4b8 (diff) | |
download | qt-creator-0a893fc6b4de4dfe8da0a85b982dcf74217225b1.tar.gz |
Merge remote-tracking branch 'origin/3.0'
28 files changed, 416 insertions, 213 deletions
diff --git a/dist/installer/ifw/config/config-linux.xml.in b/dist/installer/ifw/config/config-linux.xml.in index 21917f1331..1958a6cfbd 100644 --- a/dist/installer/ifw/config/config-linux.xml.in +++ b/dist/installer/ifw/config/config-linux.xml.in @@ -6,7 +6,7 @@ <Publisher>Qt Project</Publisher> <ProductUrl>http://qt-project.org</ProductUrl> - <Icon>logo.png</Icon> + <InstallerWindowIcon>logo.png</InstallerWindowIcon> <Watermark>watermark.png</Watermark> <UninstallerName>QtCreatorUninstaller</UninstallerName> <!-- @homeDir@ and @rootDir@ are some of the supported vars --> diff --git a/dist/installer/ifw/config/config-mac.xml.in b/dist/installer/ifw/config/config-mac.xml.in index f2084f2df4..0a74e14c8a 100644 --- a/dist/installer/ifw/config/config-mac.xml.in +++ b/dist/installer/ifw/config/config-mac.xml.in @@ -6,7 +6,7 @@ <Publisher>Qt Project</Publisher> <ProductUrl>http://qt-project.org</ProductUrl> - <Icon>logo.png</Icon> + <InstallerWindowIcon>logo.png</InstallerWindowIcon> <Watermark>watermark.png</Watermark> <UninstallerName>Uninstall Qt Creator</UninstallerName> <!-- @homeDir@ and @rootDir@ are some of the supported vars --> diff --git a/dist/installer/ifw/config/config-windows.xml.in b/dist/installer/ifw/config/config-windows.xml.in index 0b3529759f..b9b163d37f 100644 --- a/dist/installer/ifw/config/config-windows.xml.in +++ b/dist/installer/ifw/config/config-windows.xml.in @@ -6,7 +6,7 @@ <Publisher>Qt Project</Publisher> <ProductUrl>http://qt-project.org</ProductUrl> - <Icon>logo.png</Icon> + <InstallerWindowIcon>logo.png</InstallerWindowIcon> <Watermark>watermark.png</Watermark> <UninstallerName>QtCreatorUninst</UninstallerName> <!-- @homeDir@ and @rootDir@ are some of the supported vars --> diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index b7f84b345b..d37c9bb660 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -818,7 +818,7 @@ Hex2EncodedFloat4, \ Hex2EncodedFloat8, \ IPv6AddressAndHexScopeId, \ Hex2EncodedUtf8WithoutQuotes, \ -MillisecondsSinceEpoch \ +DateTimeInternal \ = range(30) # Display modes. Keep that synchronized with DebuggerDisplay in watchutils.h diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index 07b8ead43c..730955facc 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -681,7 +681,12 @@ class Dumper(DumperBase): def firstStoppedThread(self): for i in xrange(0, self.process.GetNumThreads()): thread = self.process.GetThreadAtIndex(i) - if thread.GetStopReason() == lldb.eStopReasonBreakpoint: + reason = thread.GetStopReason() + if (reason == lldb.eStopReasonBreakpoint or + reason == lldb.eStopReasonException or + reason == lldb.eStopReasonPlanComplete or + reason == lldb.eStopReasonSignal or + reason == lldb.eStopReasonWatchpoint): return thread return None diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index cb54d39200..b9e1620159 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -239,11 +239,25 @@ def qdump__QDateTime(d, value): base = d.dereferenceValue(value) if qtVersion >= 0x050200: dateBase = base + d.ptrSize() # Only QAtomicInt, but will be padded. - ms = d.extractInt64(dateBase) - offset = d.extractInt(dateBase + 12) - isValid = ms > 0 - if isValid: - d.putValue("%s" % (ms - offset * 1000), MillisecondsSinceEpoch) + # qint64 m_msecs + # Qt::TimeSpec m_spec + # int m_offsetFromUtc + # QTimeZone m_timeZone // only #ifndef QT_BOOTSTRAPPED + # StatusFlags m_status + status = d.extractInt(dateBase + 16 + d.ptrSize()) + if int(status & 0x10): # ValidDateTime + isValid = True + msecs = d.extractInt64(dateBase) + spec = d.extractInt(dateBase + 8) + offset = d.extractInt(dateBase + 12) + tzp = d.dereference(dateBase + 16) + if tzp == 0: + tz = "" + else: + idBase = tzp + 2 * d.ptrSize() # [QSharedData] + [vptr] + tz = d.encodeByteArrayHelper(d.dereference(idBase)) + d.putValue("%s/%s/%s/%s/%s" % (msecs, spec, offset, tz, status), + DateTimeInternal) else: # This relies on the Qt4/Qt5 internal structure layout: # {sharedref(4), date(8), time(4+x)} @@ -1711,7 +1725,7 @@ def qdump__QTextCursor(d, value): with Children(d): positionAddress = privAddress + 2 * d.ptrSize() + 8 d.putIntItem("position", d.extractInt(positionAddress)) - d.putIntItem("anchor", d.extractInt(positionAddress + intSize)) + d.putIntItem("anchor", d.extractInt(positionAddress + d.intSize())) d.putCallItem("selected", value, "selectedText") diff --git a/share/qtcreator/welcomescreen/qtcreator_tutorials.xml b/share/qtcreator/welcomescreen/qtcreator_tutorials.xml index 816b82353d..df18028bd9 100644 --- a/share/qtcreator/welcomescreen/qtcreator_tutorials.xml +++ b/share/qtcreator/welcomescreen/qtcreator_tutorials.xml @@ -13,18 +13,6 @@ <description><![CDATA[This tutorial uses basic elements and illustrates basic concepts of Qt Quick.]]></description> <tags>qt quick,qml,states,transitions,visual designer,qt creator</tags> </tutorial> - <tutorial imageUrl="images/icons/qt_quick_1.png" difficulty="" projectPath="" name="Qt Quick Elements, Part 1" isVideo="true" videoUrl="http://youtu.be/vGIVWfLVZLM" videoLength="5:04"> - <description><![CDATA[In this video Nigel Hietala describes how QML Elements are used. Nigel creates a new Qt Quick based application project using Qt SDK, shows how a basic UI is built using elements and is previewed in the Qt Quick viewer.]]></description> - <tags>qt quick,qml,qt sdk,qt creator</tags> - </tutorial> - <tutorial imageUrl="images/icons/qt_quick_2.png" difficulty="" projectPath="" name="Qt Quick Elements, Part 2" isVideo="true" videoUrl="http://youtu.be/fakxsSDBC-Q" videoLength="5:14"> - <description><![CDATA[In this video Nigel Hietala describes how QML Components are created and used. Nigel shows how a reusable Qt Quick component is created by defining a separate QML file.]]></description> - <tags>qt quick,qml,qt sdk,qt creator</tags> - </tutorial> - <tutorial imageUrl="images/icons/qt_quick_3.png" difficulty="" projectPath="" name="Qt Quick Elements, Part 3" isVideo="true" videoUrl="http://youtu.be/UjjIk4e_6Q4" videoLength="5:50"> - <description><![CDATA[In this video Nigel Hietala describes how to use the States and Transitions of Qt Quick. Nigel creates a simple application using a state to control the visibility of an image when a button is clicked.]]></description> - <tags>qt quick,qml,qt sdk,qt creator</tags> - </tutorial> <tutorial imageUrl="images/icons/ddays09.png" difficulty="" projectPath="" name="Qt Creator Bootcamp" isVideo="true" videoUrl="http://developer.qt.nokia.com/videos/watch/qt_creator_bootcamp" videoLength="58:29"> <description><![CDATA[All you need to start with Qt Creator - a cross-platform IDE Are you developing cross-platform applications with Qt, but are missing a cross-platform development environment?]]></description> <tags>qt sdk,qt creator</tags> diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_1.png b/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_1.png Binary files differdeleted file mode 100644 index 4a66ec851f..0000000000 --- a/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_1.png +++ /dev/null diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_2.png b/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_2.png Binary files differdeleted file mode 100644 index 7b4785b706..0000000000 --- a/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_2.png +++ /dev/null diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_3.png b/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_3.png Binary files differdeleted file mode 100644 index e4f55dfd80..0000000000 --- a/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_3.png +++ /dev/null diff --git a/src/libs/qtcreatorcdbext/knowntype.h b/src/libs/qtcreatorcdbext/knowntype.h index ee609567bc..7604d25efe 100644 --- a/src/libs/qtcreatorcdbext/knowntype.h +++ b/src/libs/qtcreatorcdbext/knowntype.h @@ -72,6 +72,7 @@ enum KnownType KT_QBasicAtomicInt = KT_Qt_Type + KT_HasSimpleDumper + 18, KT_QAtomicInt = KT_Qt_Type + KT_HasSimpleDumper + 19, KT_QStringRef = KT_Qt_Type + KT_HasSimpleDumper + 20, + KT_QTextCursor = KT_Qt_Type + KT_HasSimpleDumper + 21, KT_QObject = KT_Qt_Type + KT_HasSimpleDumper + KT_HasComplexDumper + 20, KT_QWindow = KT_Qt_Type + KT_HasSimpleDumper + KT_HasComplexDumper + 21, KT_QWidget = KT_Qt_Type + KT_HasSimpleDumper + KT_HasComplexDumper + 22, diff --git a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp index 19635c4212..7cc61ed36b 100644 --- a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp +++ b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp @@ -1281,6 +1281,8 @@ static KnownType knownClassTypeHelper(const std::string &type, return KT_QFixedPoint; if (!type.compare(qPos, 11, "QScriptLine")) return KT_QScriptLine; + if (!type.compare(qPos, 11, "QTextCursor")) + return KT_QTextCursor; break; case 12: if (!type.compare(qPos, 12, "QKeySequence")) @@ -2383,6 +2385,18 @@ static inline bool dumpQWindow(const SymbolGroupValue &v, std::wostream &str, vo return true; } +//Dump a QTextCursor +static inline bool dumpQTextCursor(const SymbolGroupValue &v, std::wostream &str) +{ + const unsigned offset = SymbolGroupValue::pointerSize() + SymbolGroupValue::sizeOf("double"); + const ULONG64 posAddr = addressOfQPrivateMember(v, QPDM_qSharedDataPadded, offset); + if (!posAddr) + return false; + const int position = SymbolGroupValue::readIntValue(v.context().dataspaces, posAddr); + str << position; + return true; +} + // Dump a std::string. static bool dumpStd_W_String(const SymbolGroupValue &v, int type, std::wostream &str, MemoryHandle **memoryHandle = 0) @@ -2796,6 +2810,10 @@ unsigned dumpSimpleType(SymbolGroupNode *n, const SymbolGroupValueContext &ctx, case KT_StdWString: rc = dumpStd_W_String(v, kt, str, memoryHandleIn) ? SymbolGroupNode::SimpleDumperOk : SymbolGroupNode::SimpleDumperFailed; break; + case KT_QTextCursor: + rc = dumpQTextCursor(v, str) ? SymbolGroupNode::SimpleDumperOk + : SymbolGroupNode::SimpleDumperFailed; + break; default: break; } diff --git a/src/plugins/debugger/debuggeritem.h b/src/plugins/debugger/debuggeritem.h index 5802b23f81..c7d9d70777 100644 --- a/src/plugins/debugger/debuggeritem.h +++ b/src/plugins/debugger/debuggeritem.h @@ -42,6 +42,7 @@ namespace Debugger { +class DebuggerItemManager; namespace Internal { class DebuggerItemConfigWidget; class DebuggerItemModel; @@ -63,7 +64,6 @@ public: QString engineTypeName() const; QVariantMap toMap() const; - void reinitializeFromFile(); QVariant id() const { return m_id; } @@ -92,6 +92,7 @@ public: private: DebuggerItem(const QVariant &id); + void reinitializeFromFile(); QVariant m_id; QString m_displayName; @@ -102,6 +103,7 @@ private: friend class Internal::DebuggerItemConfigWidget; friend class Internal::DebuggerItemModel; + friend class DebuggerItemManager; }; } // namespace Debugger diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index cef2fd529a..552018bd98 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -433,10 +433,18 @@ void DebuggerItemManager::setItemData(const QVariant &id, const QString &display for (int i = 0, n = m_debuggers.size(); i != n; ++i) { DebuggerItem &item = m_debuggers[i]; if (item.id() == id) { - item.setDisplayName(displayName); - item.setCommand(fileName); - item.reinitializeFromFile(); - emit m_instance->debuggerUpdated(id); + bool changed = false; + if (item.displayName() != displayName) { + item.setDisplayName(displayName); + changed = true; + } + if (item.command() != fileName) { + item.setCommand(fileName); + item.reinitializeFromFile(); + changed = true; + } + if (changed) + emit m_instance->debuggerUpdated(id); break; } } diff --git a/src/plugins/debugger/debuggeritemmodel.cpp b/src/plugins/debugger/debuggeritemmodel.cpp index 005115dbae..913ebe5e1c 100644 --- a/src/plugins/debugger/debuggeritemmodel.cpp +++ b/src/plugins/debugger/debuggeritemmodel.cpp @@ -152,8 +152,8 @@ bool DebuggerItemModel::updateDebuggerStandardItem(const DebuggerItem &item, boo QTC_ASSERT(parent, return false); // Do not mark items as changed if they actually are not: - DebuggerItem orig = debuggerItem(sitem); - if (orig == item && DebuggerItemManager::findById(orig.id())) + const DebuggerItem *orig = DebuggerItemManager::findById(item.id()); + if (orig && *orig == item) changed = false; int row = sitem->row(); diff --git a/src/plugins/debugger/debuggeroptionspage.cpp b/src/plugins/debugger/debuggeroptionspage.cpp index da42957d65..ef89a2d35d 100644 --- a/src/plugins/debugger/debuggeroptionspage.cpp +++ b/src/plugins/debugger/debuggeroptionspage.cpp @@ -39,6 +39,7 @@ #include <utils/qtcassert.h> #include <utils/winutils.h> +#include <QFileInfo> #include <QFormLayout> #include <QHeaderView> #include <QLabel> @@ -59,26 +60,6 @@ static const char debuggingToolsWikiLinkC[] = "http://qt-project.org/wiki/Qt_Cre // DebuggerItemConfigWidget // ----------------------------------------------------------------------- -class DebuggerItemConfigWidget : public QWidget -{ - Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::DebuggerItemConfigWidget) - -public: - explicit DebuggerItemConfigWidget(DebuggerItemModel *model); - DebuggerItem store() const; - void setItem(const DebuggerItem &item); - void apply(); - -private: - QLineEdit *m_displayNameLineEdit; - QLabel *m_cdbLabel; - PathChooser *m_binaryChooser; - QLineEdit *m_abis; - DebuggerItemModel *m_model; - bool m_autodetected; - QVariant m_id; -}; - DebuggerItemConfigWidget::DebuggerItemConfigWidget(DebuggerItemModel *model) : m_model(model) { @@ -90,6 +71,7 @@ DebuggerItemConfigWidget::DebuggerItemConfigWidget(DebuggerItemModel *model) : m_binaryChooser->setExpectedKind(PathChooser::ExistingCommand); m_binaryChooser->setMinimumWidth(400); m_binaryChooser->setHistoryCompleter(QLatin1String("DebuggerPaths")); + connect(m_binaryChooser, SIGNAL(changed(QString)), this, SLOT(commandWasChanged())); m_cdbLabel = new QLabel(this); m_cdbLabel->setTextInteractionFlags(Qt::TextBrowserInteraction); @@ -107,7 +89,7 @@ DebuggerItemConfigWidget::DebuggerItemConfigWidget(DebuggerItemModel *model) : formLayout->addRow(new QLabel(tr("ABIs:")), m_abis); } -DebuggerItem DebuggerItemConfigWidget::store() const +DebuggerItem DebuggerItemConfigWidget::item() const { DebuggerItem item(m_id); if (m_id.isNull()) @@ -116,11 +98,28 @@ DebuggerItem DebuggerItemConfigWidget::store() const item.setDisplayName(m_displayNameLineEdit->text()); item.setCommand(m_binaryChooser->fileName()); item.setAutoDetected(m_autodetected); - item.reinitializeFromFile(); - m_model->updateDebugger(item); + QList<ProjectExplorer::Abi> abiList; + foreach (const QString &a, m_abis->text().split(QRegExp(QLatin1String("[^A-Za-z0-9-_]+")))) { + ProjectExplorer::Abi abi(a); + if (a.isNull()) + continue; + abiList << a; + } + item.setAbis(abiList); return item; } + +void DebuggerItemConfigWidget::store() const +{ + m_model->updateDebugger(item()); +} + +void DebuggerItemConfigWidget::setAbis(const QStringList &abiNames) +{ + m_abis->setText(abiNames.join(QLatin1String(", "))); +} + void DebuggerItemConfigWidget::setItem(const DebuggerItem &item) { store(); // store away the (changed) settings for future use @@ -157,17 +156,34 @@ void DebuggerItemConfigWidget::setItem(const DebuggerItem &item) m_cdbLabel->setVisible(!text.isEmpty()); m_binaryChooser->setCommandVersionArguments(QStringList(versionCommand)); - m_abis->setText(item.abiNames().join(QLatin1String(", "))); + setAbis(item.abiNames()); } void DebuggerItemConfigWidget::apply() { - DebuggerItem item = m_model->currentDebugger(); - if (!item.isValid()) + DebuggerItem current = m_model->currentDebugger(); + if (!current.isValid()) return; // Nothing was selected here. - item = store(); - setItem(item); + store(); + setItem(item()); +} + +void DebuggerItemConfigWidget::commandWasChanged() +{ + // Use DebuggerItemManager as a cache: + const DebuggerItem *existing + = DebuggerItemManager::findByCommand(m_binaryChooser->fileName()); + if (existing) { + setAbis(existing->abiNames()); + } else { + QFileInfo fi = QFileInfo(m_binaryChooser->path()); + if (fi.isExecutable()) { + DebuggerItem tmp = item(); + tmp.reinitializeFromFile(); + setAbis(tmp.abiNames()); + } + } } // -------------------------------------------------------------------------- diff --git a/src/plugins/debugger/debuggeroptionspage.h b/src/plugins/debugger/debuggeroptionspage.h index fd1782f4b4..9eff612759 100644 --- a/src/plugins/debugger/debuggeroptionspage.h +++ b/src/plugins/debugger/debuggeroptionspage.h @@ -30,15 +30,23 @@ #ifndef DEBUGGER_DEBUGGEROPTIONSPAGE_H #define DEBUGGER_DEBUGGEROPTIONSPAGE_H +#include "debuggeritem.h" + #include <coreplugin/dialogs/ioptionspage.h> +#include <QWidget> + QT_BEGIN_NAMESPACE +class QLabel; +class QLineEdit; class QPushButton; class QTreeView; -class QWidget; QT_END_NAMESPACE -namespace Utils { class DetailsWidget; } +namespace Utils { +class DetailsWidget; +class PathChooser; +} // namespace Utils namespace Debugger { namespace Internal { @@ -47,6 +55,36 @@ class DebuggerItemModel; class DebuggerItemConfigWidget; class DebuggerKitConfigWidget; +// ----------------------------------------------------------------------- +// DebuggerItemConfigWidget +// ----------------------------------------------------------------------- + +class DebuggerItemConfigWidget : public QWidget +{ + Q_OBJECT + +public: + explicit DebuggerItemConfigWidget(DebuggerItemModel *model); + void setItem(const DebuggerItem &item); + void apply(); + +private slots: + void commandWasChanged(); + +private: + DebuggerItem item() const; + void store() const; + void setAbis(const QStringList &abiNames); + + QLineEdit *m_displayNameLineEdit; + QLabel *m_cdbLabel; + Utils::PathChooser *m_binaryChooser; + QLineEdit *m_abis; + DebuggerItemModel *m_model; + bool m_autodetected; + QVariant m_id; +}; + // -------------------------------------------------------------------------- // DebuggerOptionsPage // -------------------------------------------------------------------------- diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp index a65f4f2997..7f673ab8e2 100644 --- a/src/plugins/debugger/debuggerprotocol.cpp +++ b/src/plugins/debugger/debuggerprotocol.cpp @@ -33,6 +33,7 @@ #include <QDateTime> #include <QDebug> #include <QHostAddress> +#include <QTimeZone> #include <ctype.h> @@ -503,6 +504,53 @@ static QTime timeFromData(int ms) return ms == -1 ? QTime() : QTime(0, 0, 0, 0).addMSecs(ms); } +// Stolen and adapted from qdatetime.cpp +static void getDateTime(qint64 msecs, int status, QDate *date, QTime *time) +{ + enum { + SECS_PER_DAY = 86400, + MSECS_PER_DAY = 86400000, + SECS_PER_HOUR = 3600, + MSECS_PER_HOUR = 3600000, + SECS_PER_MIN = 60, + MSECS_PER_MIN = 60000, + TIME_T_MAX = 2145916799, // int maximum 2037-12-31T23:59:59 UTC + JULIAN_DAY_FOR_EPOCH = 2440588 // result of julianDayFromDate(1970, 1, 1) + }; + + // Status of date/time + enum StatusFlag { + NullDate = 0x01, + NullTime = 0x02, + ValidDate = 0x04, + ValidTime = 0x08, + ValidDateTime = 0x10, + TimeZoneCached = 0x20, + SetToStandardTime = 0x40, + SetToDaylightTime = 0x80 + }; + + qint64 jd = JULIAN_DAY_FOR_EPOCH; + qint64 ds = 0; + + if (qAbs(msecs) >= MSECS_PER_DAY) { + jd += (msecs / MSECS_PER_DAY); + msecs %= MSECS_PER_DAY; + } + + if (msecs < 0) { + ds = MSECS_PER_DAY - msecs - 1; + jd -= ds / MSECS_PER_DAY; + ds = ds % MSECS_PER_DAY; + ds = MSECS_PER_DAY - ds - 1; + } else { + ds = msecs; + } + + *date = (status & NullDate) ? QDate() : QDate::fromJulianDay(jd); + *time = (status & NullTime) ? QTime() : QTime::fromMSecsSinceStartOfDay(ds); +} + QString decodeData(const QByteArray &ba, int encoding) { switch (encoding) { @@ -629,15 +677,37 @@ QString decodeData(const QByteArray &ba, int encoding) const QByteArray decodedBa = QByteArray::fromHex(ba); return QString::fromUtf8(decodedBa); } - case MillisecondsSinceEpoch: { - bool ok = false; - const qint64 ms = ba.toLongLong(&ok); - if (!ok) - return QLatin1String(ba); - QDateTime d; - d.setTimeSpec(Qt::UTC); - d.setMSecsSinceEpoch(ms); - return d.isValid() ? d.toString(Qt::TextDate) : QLatin1String("(invalid)"); + case DateTimeInternal: { // 29, DateTimeInternal: msecs, spec, offset, tz, status + int p0 = ba.indexOf('/'); + int p1 = ba.indexOf('/', p0 + 1); + int p2 = ba.indexOf('/', p1 + 1); + int p3 = ba.indexOf('/', p2 + 1); + + qint64 msecs = ba.left(p0).toLongLong(); + ++p0; + Qt::TimeSpec spec = Qt::TimeSpec(ba.mid(p0, p1 - p0).toInt()); + ++p1; + qulonglong offset = ba.mid(p1, p2 - p1).toInt(); + ++p2; + QByteArray timeZoneId = QByteArray::fromHex(ba.mid(p2, p3 - p2)); + ++p3; + int status = ba.mid(p3).toInt(); + + QDate date; + QTime time; + getDateTime(msecs, status, &date, &time); + + QDateTime dateTime; + if (spec == Qt::OffsetFromUTC) { + dateTime = QDateTime(date, time, spec, offset); + } else if (spec == Qt::TimeZone) { + if (!QTimeZone::isTimeZoneIdAvailable(timeZoneId)) + return QLatin1String("<unavailable>"); + dateTime = QDateTime(date, time, QTimeZone(timeZoneId)); + } else { + dateTime = QDateTime(date, time, spec); + } + return dateTime.toString(); } } qDebug() << "ENCODING ERROR: " << encoding; diff --git a/src/plugins/debugger/debuggerprotocol.h b/src/plugins/debugger/debuggerprotocol.h index a71bb6f133..bf90dd226e 100644 --- a/src/plugins/debugger/debuggerprotocol.h +++ b/src/plugins/debugger/debuggerprotocol.h @@ -205,7 +205,7 @@ enum DebuggerEncoding Hex2EncodedFloat8 = 26, IPv6AddressAndHexScopeId = 27, Hex2EncodedUtf8WithoutQuotes = 28, - MillisecondsSinceEpoch = 29 + DateTimeInternal = 29 }; // Keep in sync with dumper.py, symbolgroupvalue.cpp of CDB diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 0e8af01c25..2a1a3ef574 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -6512,10 +6512,19 @@ void FakeVimHandler::Private::scrollToLine(int line) EDITOR(setTextCursor(tc2)); EDITOR(ensureCursorVisible()); + int offset = 0; const QTextBlock block = document()->findBlockByLineNumber(line); - const QTextLine textLine = block.isValid() - ? block.layout()->lineAt(line - block.firstLineNumber()) : QTextLine(); - tc2.setPosition(block.position() + (textLine.isValid() ? textLine.textStart() : 0)); + if (block.isValid()) { + const int blockLineCount = block.layout()->lineCount(); + const int lineInBlock = line - block.firstLineNumber(); + if (0 <= lineInBlock && lineInBlock < blockLineCount) { + QTextLine textLine = block.layout()->lineAt(lineInBlock); + offset = textLine.textStart(); + } else { +// QTC_CHECK(false); + } + } + tc2.setPosition(block.position() + offset); EDITOR(setTextCursor(tc2)); EDITOR(ensureCursorVisible()); diff --git a/src/plugins/ios/iosdevice.cpp b/src/plugins/ios/iosdevice.cpp index 801b865575..58cf894b96 100644 --- a/src/plugins/ios/iosdevice.cpp +++ b/src/plugins/ios/iosdevice.cpp @@ -46,6 +46,8 @@ #include <CoreFoundation/CoreFoundation.h> #endif +#include <exception> + using namespace ProjectExplorer; static bool debugDeviceDetection = false; @@ -364,62 +366,80 @@ io_iterator_t gRemovedIter; extern "C" { void deviceConnectedCallback(void *refCon, io_iterator_t iterator) { - kern_return_t kr; - io_service_t usbDevice; - (void) refCon; - - while ((usbDevice = IOIteratorNext(iterator))) { - io_name_t deviceName; - - // Get the USB device's name. - kr = IORegistryEntryGetName(usbDevice, deviceName); - QString name; - if (KERN_SUCCESS == kr) - name = QString::fromLocal8Bit(deviceName); - if (debugDeviceDetection) - qDebug() << "ios device " << name << " in deviceAddedCallback"; - - CFStringRef cfUid = static_cast<CFStringRef>(IORegistryEntryCreateCFProperty( - usbDevice, - CFSTR(kUSBSerialNumberString), - kCFAllocatorDefault, 0)); - QString uid = CFStringRef2QString(cfUid); - CFRelease(cfUid); - IosDeviceManager::instance()->deviceConnected(uid, name); - - // Done with this USB device; release the reference added by IOIteratorNext - kr = IOObjectRelease(usbDevice); - } -} - -void deviceDisconnectedCallback(void *refCon, io_iterator_t iterator) -{ - kern_return_t kr; - io_service_t usbDevice; - (void) refCon; - - while ((usbDevice = IOIteratorNext(iterator))) { - io_name_t deviceName; - - // Get the USB device's name. - kr = IORegistryEntryGetName(usbDevice, deviceName); - if (KERN_SUCCESS != kr) - deviceName[0] = '\0'; - if (debugDeviceDetection) - qDebug() << "ios device " << deviceName << " in deviceDisconnectedCallback"; + try { + kern_return_t kr; + io_service_t usbDevice; + (void) refCon; + + while ((usbDevice = IOIteratorNext(iterator))) { + io_name_t deviceName; + + // Get the USB device's name. + kr = IORegistryEntryGetName(usbDevice, deviceName); + QString name; + if (KERN_SUCCESS == kr) + name = QString::fromLocal8Bit(deviceName); + if (debugDeviceDetection) + qDebug() << "ios device " << name << " in deviceAddedCallback"; - { CFStringRef cfUid = static_cast<CFStringRef>(IORegistryEntryCreateCFProperty( usbDevice, CFSTR(kUSBSerialNumberString), kCFAllocatorDefault, 0)); QString uid = CFStringRef2QString(cfUid); CFRelease(cfUid); - IosDeviceManager::instance()->deviceDisconnected(uid); + IosDeviceManager::instance()->deviceConnected(uid, name); + + // Done with this USB device; release the reference added by IOIteratorNext + kr = IOObjectRelease(usbDevice); } + } + catch (std::exception &e) { + qDebug() << "Exception " << e.what() << " in iosdevice.cpp deviceConnectedCallback"; + } + catch (...) { + qDebug() << "Exception in iosdevice.cpp deviceConnectedCallback"; + throw; + } +} + +void deviceDisconnectedCallback(void *refCon, io_iterator_t iterator) +{ + try { + kern_return_t kr; + io_service_t usbDevice; + (void) refCon; + + while ((usbDevice = IOIteratorNext(iterator))) { + io_name_t deviceName; + + // Get the USB device's name. + kr = IORegistryEntryGetName(usbDevice, deviceName); + if (KERN_SUCCESS != kr) + deviceName[0] = '\0'; + if (debugDeviceDetection) + qDebug() << "ios device " << deviceName << " in deviceDisconnectedCallback"; + + { + CFStringRef cfUid = static_cast<CFStringRef>(IORegistryEntryCreateCFProperty( + usbDevice, + CFSTR(kUSBSerialNumberString), + kCFAllocatorDefault, 0)); + QString uid = CFStringRef2QString(cfUid); + CFRelease(cfUid); + IosDeviceManager::instance()->deviceDisconnected(uid); + } - // Done with this USB device; release the reference added by IOIteratorNext - kr = IOObjectRelease(usbDevice); + // Done with this USB device; release the reference added by IOIteratorNext + kr = IOObjectRelease(usbDevice); + } + } + catch (std::exception &e) { + qDebug() << "Exception " << e.what() << " in iosdevice.cpp deviceDisconnectedCallback"; + } + catch (...) { + qDebug() << "Exception in iosdevice.cpp deviceDisconnectedCallback"; + throw; } } diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp index 5a6eaf6491..d78fd473c7 100644 --- a/src/plugins/ios/iostoolhandler.cpp +++ b/src/plugins/ios/iostoolhandler.cpp @@ -42,6 +42,7 @@ #include <QList> #include <QScopedArrayPointer> #include <QProcessEnvironment> +#include <QFileInfo> #include <string.h> #include <errno.h> @@ -129,7 +130,7 @@ public: virtual void requestDeviceInfo(const QString &deviceId, int timeout = 1000) = 0; bool isRunning(); void start(const QString &exe, const QStringList &args); - void stop(); + void stop(int errorCode); // signals void isTransferringApp(const QString &bundlePath, const QString &deviceId, int progress, @@ -203,6 +204,12 @@ IosToolHandlerPrivate::IosToolHandlerPrivate(IosToolHandler::DeviceType devType, foreach (const QString &k, env.keys()) if (k.startsWith(QLatin1String("DYLD_"))) env.remove(k); + QString xcPath = IosConfigurations::developerPath().appendPath(QLatin1String("../OtherFrameworks")).toFileInfo().canonicalFilePath(); + env.insert(QLatin1String("DYLD_FALLBACK_FRAMEWORK_PATH"), + xcPath.isEmpty() ? + QString::fromLatin1("/System/Library/PrivateFrameworks") + : (xcPath + QLatin1String(":/System/Library/PrivateFrameworks"))); + process.setProcessEnvironment(env); QObject::connect(&process, SIGNAL(readyReadStandardOutput()), q, SLOT(subprocessHasData())); QObject::connect(&process, SIGNAL(finished(int,QProcess::ExitStatus)), @@ -226,20 +233,40 @@ void IosToolHandlerPrivate::start(const QString &exe, const QStringList &args) state = StartedInferior; } -void IosToolHandlerPrivate::stop() +void IosToolHandlerPrivate::stop(int errorCode) { if (debugToolHandler) qDebug() << "IosToolHandlerPrivate::stop"; - if (process.state() != QProcess::NotRunning) { - process.close(); - process.kill(); - if (debugToolHandler) - qDebug() << "killing"; - } - if (state != Stopped) { - state = Stopped; - emit q->finished(q); + State oldState = state; + state = Stopped; + switch (oldState) { + case NonStarted: + qDebug() << "IosToolHandler::stop() when state was NonStarted"; + // pass + case Starting: + switch (op){ + case OpNone: + qDebug() << "IosToolHandler::stop() when op was OpNone"; + break; + case OpAppTransfer: + didTransferApp(bundlePath, deviceId, IosToolHandler::Failure); + break; + case OpAppRun: + didStartApp(bundlePath, deviceId, IosToolHandler::Failure); + break; + case OpDeviceInfo: + break; + } + // pass + case StartedInferior: + case XmlEndProcessed: + toolExited(errorCode); + break; + case Stopped: + return; } + if (process.state() != QProcess::NotRunning) + process.kill(); } // signals @@ -296,67 +323,22 @@ void IosToolHandlerPrivate::toolExited(int code) void IosToolHandlerPrivate::subprocessError(QProcess::ProcessError error) { - switch (state) { - case NonStarted: - qDebug() << "subprocessError() when state was NonStarted"; - // pass - case Starting: - switch (op){ - case OpNone: - qDebug() << "subprocessError() when op is OpNone"; - break; - case OpAppTransfer: - didTransferApp(bundlePath, deviceId, IosToolHandler::Failure); - break; - case OpAppRun: - didStartApp(bundlePath, deviceId, IosToolHandler::Failure); - break; - case OpDeviceInfo: - break; - } - // pass - case StartedInferior: - errorMsg(IosToolHandler::tr("Subprocess Error %1").arg(error)); - toolExited(-1); - break; - case XmlEndProcessed: - case Stopped: - qDebug() << "IosToolHandler, subprocessError() in an already stopped process"; + if (state != Stopped) + errorMsg(IosToolHandler::tr("iOS tool Error %1").arg(error)); + stop(-1); + if (error == QProcess::FailedToStart) { + if (debugToolHandler) + qDebug() << "IosToolHandler::finished(" << this << ")"; + emit q->finished(q); } } void IosToolHandlerPrivate::subprocessFinished(int exitCode, QProcess::ExitStatus exitStatus) { - // process potentially pending data - subprocessHasData(); - switch (state) { - case NonStarted: - qDebug() << "subprocessFinished() when state was NonStarted"; - // pass - case Starting: - switch (op){ - case OpNone: - qDebug() << "subprocessFinished() when op was OpNone"; - break; - case OpAppTransfer: - didTransferApp(bundlePath, deviceId, IosToolHandler::Failure); - break; - case OpAppRun: - didStartApp(bundlePath, deviceId, IosToolHandler::Failure); - break; - case OpDeviceInfo: - break; - } - // pass - case StartedInferior: - case XmlEndProcessed: - toolExited((exitStatus == QProcess::CrashExit && exitCode == 0) ? -1 : exitCode); - break; - case Stopped: - if (debugToolHandler) - qDebug() << "IosToolHandler, subprocessFinished() in an already stopped process (normal)"; - break; - } + stop((exitStatus == QProcess::NormalExit) ? exitCode : -1 ); + if (debugToolHandler) + qDebug() << "IosToolHandler::finished(" << this << ")"; + emit q->finished(q); } void IosToolHandlerPrivate::processXml() @@ -469,7 +451,8 @@ void IosToolHandlerPrivate::processXml() break; case ParserState::QueryResult: state = XmlEndProcessed; - break; + stop(0); + return; case ParserState::AppOutput: break; case ParserState::AppStarted: @@ -523,7 +506,7 @@ void IosToolHandlerPrivate::processXml() if (outputParser.hasError() && outputParser.error() != QXmlStreamReader::PrematureEndOfDocumentError) { qDebug() << "error parsing iosTool output:" << outputParser.errorString(); - stop(); + stop(-1); } } @@ -544,7 +527,7 @@ void IosToolHandlerPrivate::subprocessHasData() while (true) { qint64 rRead = process.read(buf, sizeof(buf)); if (rRead == -1) { - stop(); + stop(-1); return; } if (rRead == 0) @@ -556,7 +539,7 @@ void IosToolHandlerPrivate::subprocessHasData() } } case XmlEndProcessed: - stop(); + stop(0); return; case Stopped: return; @@ -737,7 +720,7 @@ IosToolHandler::~IosToolHandler() void IosToolHandler::stop() { - d->stop(); + d->stop(-1); } void IosToolHandler::requestTransferApp(const QString &bundlePath, const QString &deviceId, diff --git a/src/plugins/projectexplorer/projectexplorer.qrc b/src/plugins/projectexplorer/projectexplorer.qrc index 85ea369bbe..896b5dc4ab 100644 --- a/src/plugins/projectexplorer/projectexplorer.qrc +++ b/src/plugins/projectexplorer/projectexplorer.qrc @@ -23,6 +23,7 @@ <file>images/compile_error.png</file> <file>images/compile_warning.png</file> <file>images/BuildSettings.png</file> + <file>images/CodeStyleSettings.png</file> <file>images/RunSettings.png</file> <file>images/EditorSettings.png</file> <file>images/ProjectDependencies.png</file> diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp index 3211a8f35f..78c8fad0c2 100644 --- a/src/plugins/projectexplorer/target.cpp +++ b/src/plugins/projectexplorer/target.cpp @@ -551,15 +551,16 @@ void Target::updateDefaultDeployConfigurations() dcIds.append(dcFactory->availableCreationIds(this)); QList<DeployConfiguration *> dcList = deployConfigurations(); + QList<Core::Id> toCreate = dcIds; foreach (DeployConfiguration *dc, dcList) { if (dcIds.contains(dc->id())) - dcIds.removeOne(dc->id()); + toCreate.removeOne(dc->id()); else removeDeployConfiguration(dc); } - foreach (Core::Id id, dcIds) { + foreach (Core::Id id, toCreate) { foreach (DeployConfigurationFactory *dcFactory, dcFactories) { if (dcFactory->canCreate(this, id)) { DeployConfiguration *dc = dcFactory->create(this, id); diff --git a/src/plugins/qmlprofiler/qml/MainView.qml b/src/plugins/qmlprofiler/qml/MainView.qml index e8bce8ea0d..8d8fe25d69 100644 --- a/src/plugins/qmlprofiler/qml/MainView.qml +++ b/src/plugins/qmlprofiler/qml/MainView.qml @@ -309,8 +309,11 @@ Rectangle { boundsBehavior: Flickable.StopAtBounds // ScrollView will try to deinteractivate it. We don't want that - // as the horizontal flickable is interactive, too. - onInteractiveChanged: interactive = true + // as the horizontal flickable is interactive, too. We do occasionally + // switch to non-interactive ourselves, though. + property bool stayInteractive: true + onInteractiveChanged: interactive = stayInteractive + onStayInteractiveChanged: interactive = stayInteractive // ***** child items TimeMarks { @@ -429,6 +432,9 @@ Rectangle { onPressed: { selectionRange.pressedOnCreation(); } + onCanceled: { + selectionRange.releasedOnCreation(); + } onPositionChanged: { selectionRange.movedOnCreation(); } diff --git a/src/plugins/qmlprofiler/qml/SelectionRange.qml b/src/plugins/qmlprofiler/qml/SelectionRange.qml index 78e09cfb40..381aa27c74 100644 --- a/src/plugins/qmlprofiler/qml/SelectionRange.qml +++ b/src/plugins/qmlprofiler/qml/SelectionRange.qml @@ -42,6 +42,7 @@ RangeMover { property real duration: Math.max(getWidth() * viewTimePerPixel, 500) property real viewTimePerPixel: 1 property int creationState : 0 + property int creationReference : 0 Connections { target: zoomControl @@ -65,6 +66,7 @@ RangeMover { function reset(setVisible) { setRight(getLeft() + 1); creationState = 0; + creationReference = 0; visible = setVisible; } @@ -75,18 +77,21 @@ RangeMover { pos = width; switch (creationState) { - case 1: { + case 1: + creationReference = pos; setLeft(pos); setRight(pos + 1); break; - } - case 2: { - setLeft(Math.min(getLeft(), pos)); - setRight(Math.max(getRight(), pos)); + case 2: + if (pos > creationReference) { + setLeft(creationReference); + setRight(pos); + } else if (pos < creationReference) { + setLeft(pos); + setRight(creationReference); + } break; } - default: return; - } } @@ -104,6 +109,7 @@ RangeMover { function releasedOnCreation() { if (selectionRange.creationState === 2) { flick.interactive = true; + vertflick.stayInteractive = true; selectionRange.creationState = 3; selectionRangeControl.enabled = false; } @@ -112,6 +118,7 @@ RangeMover { function pressedOnCreation() { if (selectionRange.creationState === 1) { flick.interactive = false; + vertflick.stayInteractive = false; selectionRange.setPos(selectionRangeControl.mouseX + flick.contentX); selectionRange.creationState = 2; } diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index da28a198a9..5fa7e46003 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -1243,7 +1243,9 @@ void tst_Dumpers::dumper_data() "ba += 2;\n") % CoreProfile() % Check("ba", QByteArray("\"Hello\"World") - + char(0) + char(1) + char(2) + '"', "@QByteArray") + + char(0) + char(1) + char(2) + '"', "@QByteArray").setEngines( + DumpTestGdbEngine | DumpTestLldbEngine) + % Check("ba", QByteArray("\"Hello\"World...\""), "@QByteArray").setForCdbOnly() % Check("ba.0", "[0]", "72", "char") % Check("ba.11", "[11]", "0", "char") % Check("ba.12", "[12]", "1", "char") @@ -1382,7 +1384,8 @@ void tst_Dumpers::dumper_data() "unused(&dir, &s, &fi);\n") % CoreProfile() % Check("dir", tempDir, "@QDir") - % Check("dir.absolutePath", tempDir, "@QString"); + % Check("dir.absolutePath", tempDir, "@QString").setEngines( + DumpTestGdbEngine | DumpTestLldbEngine); // % Check("dir.canonicalPath", tempDir, "@QString"); QTest::newRow("QFileInfo") @@ -1880,8 +1883,14 @@ void tst_Dumpers::dumper_data() % CheckType("loc", "@QLocale") % CheckType("m", "@QLocale::MeasurementSystem") % Check("loc1", "\"en_US\"", "@QLocale") - % Check("m1", Value5("@QLocale::ImperialUSSystem (1)"), "@QLocale::MeasurementSystem") - % Check("m1", Value4("@QLocale::ImperialSystem (1)"), "@QLocale::MeasurementSystem"); + % Check("m1", Value5("@QLocale::ImperialUSSystem (1)"), + "@QLocale::MeasurementSystem").setForGdbOnly() + % Check("m1", Value4("@QLocale::ImperialSystem (1)"), + "@QLocale::MeasurementSystem").setForGdbOnly() + % Check("m1", Value5("ImperialUSSystem"), + "@QLocale::MeasurementSystem").setForLldbOnly() + % Check("m1", Value4("ImperialSystem"), + "@QLocale::MeasurementSystem").setForLldbOnly(); QTest::newRow("QMapUIntStringList") << Data("#include <QMap>\n" @@ -2586,8 +2595,8 @@ void tst_Dumpers::dumper_data() % CoreProfile() % Cxx11Profile() % MacLibCppProfile() - % Check("a", "<4 items>", Pattern("std::array<int, 4u.*>")) - % Check("b", "<4 items>", Pattern("std::array<@QString, 4u.*>")); + % Check("a", "<4 items>", Pattern("std::array<int, 4.*>")) + % Check("b", "<4 items>", Pattern("std::array<@QString, 4.*>")); QTest::newRow("StdComplex") << Data("#include <complex>\n", @@ -2660,6 +2669,7 @@ void tst_Dumpers::dumper_data() "h.insert(194);\n" "h.insert(2);\n" "h.insert(3);\n") + % GdbOnly() % Profile("QMAKE_CXXFLAGS += -Wno-deprecated") % Check("h", "<4 items>", "__gnu__cxx::hash_set<int>") % Check("h.0", "[0]", "194", "int") @@ -3125,8 +3135,9 @@ void tst_Dumpers::dumper_data() "v.push_back(true);\n" "v.push_back(false);\n" "unused(&v);\n") - // Known issue: Clang produces "std::vector<std::allocator<bool>> - % Check("v", "<5 items>", "std::vector<bool>") + % Check("v", "<5 items>", "std::vector<bool>").setForGdbOnly() + // Known issue: Clang produces "std::vector<std::allocator<bool>> + % Check("v", "<5 items>", "std::vector<std::allocator<bool>>").setForLldbOnly() % Check("v.0", "[0]", "1", "bool") % Check("v.1", "[1]", "0", "bool") % Check("v.2", "[2]", "0", "bool") @@ -3138,10 +3149,12 @@ void tst_Dumpers::dumper_data() "std::vector<bool> v1(65, true);\n" "std::vector<bool> v2(65);\n" "unused(&v1, &v2);\n") - % Check("v1", "<65 items>", "std::vector<bool>") + % Check("v1", "<65 items>", "std::vector<bool>").setForGdbOnly() + % Check("v1", "<65 items>", "std::vector<std::allocator<bool>>").setForLldbOnly() % Check("v1.0", "[0]", "1", "bool") % Check("v1.64", "[64]", "1", "bool") - % Check("v2", "<65 items>", "std::vector<bool>") + % Check("v2", "<65 items>", "std::vector<bool>").setForGdbOnly() + % Check("v2", "<65 items>", "std::vector<std::allocator<bool>>").setForLldbOnly() % Check("v2.0", "[0]", "0", "bool") % Check("v2.64", "[64]", "0", "bool"); diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp index f7ce97ed5f..ddadcea05c 100644 --- a/tests/manual/debugger/simple/simple_test_app.cpp +++ b/tests/manual/debugger/simple/simple_test_app.cpp @@ -5475,8 +5475,11 @@ namespace basic { void testLongEvaluation1() { + QTimeZone tz("UTC+05:00"); QDateTime time = QDateTime::currentDateTime(); const int N = 10000; + QDateTime x = time; + x.setTimeZone(tz); QDateTime bigv[N]; for (int i = 0; i < 10000; ++i) { bigv[i] = time; |