diff --git a/qtbase/src/angle/src/common/common.pri b/qtbase/src/angle/src/common/common.pri index 8baedc5..7ea4700 100644 --- a/qtbase/src/angle/src/common/common.pri +++ b/qtbase/src/angle/src/common/common.pri @@ -13,7 +13,7 @@ lib_replace.CONFIG = path QMAKE_PRL_INSTALL_REPLACE += lib_replace # DirectX is included in the Windows 8 Kit, but everything else requires the DX SDK. -win32-msvc2012|win32-msvc2013|winrt { +win32-msvc2012|win32-msvc2013|win32-msvc2015|winrt { FXC = fxc.exe } else { DX_DIR = $$(DXSDK_DIR) diff --git a/qtbase/src/corelib/global/qnamespace.h b/qtbase/src/corelib/global/qnamespace.h index e239a11..b8e7466 100644 --- a/qtbase/src/corelib/global/qnamespace.h +++ b/qtbase/src/corelib/global/qnamespace.h @@ -148,6 +148,8 @@ public: SHIFT = Qt::ShiftModifier, CTRL = Qt::ControlModifier, ALT = Qt::AltModifier, + KP = Qt::KeypadModifier, + GROUP = Qt::GroupSwitchModifier, MODIFIER_MASK = KeyboardModifierMask, UNICODE_ACCEL = 0x00000000 }; diff --git a/qtbase/src/corelib/tools/qlocale.cpp b/qtbase/src/corelib/tools/qlocale.cpp index a923be5..1f1fe84 100644 --- a/qtbase/src/corelib/tools/qlocale.cpp +++ b/qtbase/src/corelib/tools/qlocale.cpp @@ -331,7 +331,7 @@ const QLocaleData *QLocaleData::findLocaleData(QLocale::Language language, QLoca uint idx = locale_index[localeId.language_id]; - const QLocaleData *data = locale_data + idx; + const QLocaleData *data = qt_locale_data + idx; if (idx == 0) // default language has no associated country return data; @@ -348,7 +348,7 @@ const QLocaleData *QLocaleData::findLocaleData(QLocale::Language language, QLoca // no match; try again with default script localeId.script_id = QLocale::AnyScript; - data = locale_data + idx; + data = qt_locale_data + idx; } if (localeId.script_id == QLocale::AnyScript && localeId.country_id == QLocale::AnyCountry) @@ -368,7 +368,7 @@ const QLocaleData *QLocaleData::findLocaleData(QLocale::Language language, QLoca } while (data->m_language_id == localeId.language_id); } - return locale_data + idx; + return qt_locale_data + idx; } static bool parse_locale_tag(const QString &input, int &i, QString *result, const QString &separators) @@ -522,7 +522,7 @@ int qt_repeatCount(const QString &s, int i) static const QLocaleData *default_data = 0; static uint default_number_options = 0; -static const QLocaleData *const c_data = locale_data; +static const QLocaleData *const c_data = qt_locale_data; static QLocalePrivate *c_private() { static QLocalePrivate c_locale = { c_data, Q_BASIC_ATOMIC_INITIALIZER(1), 0 }; @@ -632,7 +632,7 @@ static const QLocaleData *systemData() return system_data; #else - return locale_data; + return qt_locale_data; #endif } @@ -688,7 +688,7 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l) #endif // QT_NO_DATASTREAM -static const int locale_data_size = sizeof(locale_data)/sizeof(QLocaleData) - 1; +static const int locale_data_size = sizeof(qt_locale_data)/sizeof(QLocaleData) - 1; Q_GLOBAL_STATIC_WITH_ARGS(QSharedDataPointer, defaultLocalePrivate, (QLocalePrivate::create(defaultData(), default_number_options))) @@ -2054,8 +2054,8 @@ QList QLocale::matchingLocales(QLocale::Language language, QList result; if (language == QLocale::AnyLanguage && script == QLocale::AnyScript && country == QLocale::AnyCountry) result.reserve(locale_data_size); - const QLocaleData *data = locale_data + locale_index[language]; - while ( (data != locale_data + locale_data_size) + const QLocaleData *data = qt_locale_data + locale_index[language]; + while ( (data != qt_locale_data + locale_data_size) && (language == QLocale::AnyLanguage || data->m_language_id == uint(language))) { if ((script == QLocale::AnyScript || data->m_script_id == uint(script)) && (country == QLocale::AnyCountry || data->m_country_id == uint(country))) { @@ -2086,7 +2086,7 @@ QList QLocale::countriesForLanguage(Language language) } unsigned language_id = language; - const QLocaleData *data = locale_data + locale_index[language_id]; + const QLocaleData *data = qt_locale_data + locale_index[language_id]; while (data->m_language_id == language_id) { const QLocale::Country country = static_cast(data->m_country_id); if (!result.contains(country)) diff --git a/qtbase/src/corelib/tools/qlocale_data_p.h b/qtbase/src/corelib/tools/qlocale_data_p.h index 6571e45..3911801 100644 --- a/qtbase/src/corelib/tools/qlocale_data_p.h +++ b/qtbase/src/corelib/tools/qlocale_data_p.h @@ -1063,7 +1063,7 @@ static const quint16 locale_index[] = { 0 // trailing 0 }; -static const QLocaleData locale_data[] = { +static const QLocaleData qt_locale_data[] = { // lang script terr dec group list prcnt zero minus plus exp quotStart quotEnd altQuotStart altQuotEnd lpStart lpMid lpEnd lpTwo sDtFmt lDtFmt sTmFmt lTmFmt ssMonth slMonth sMonth lMonth sDays lDays am,len pm,len { 1, 0, 0, 46, 44, 59, 37, 48, 45, 43, 101, 34, 34, 39, 39, 0,6 , 0,6 , 0,6 , 0,6 , 0,10 , 10,17 , 0,8 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 158,27 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 99,14 , 0,2 , 0,2 , {0,0,0}, 0,0 , 0,7 , 0,4 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // C/AnyScript/AnyCountry { 3, 7, 69, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 35,18 , 18,7 , 25,12 , 185,48 , 233,111 , 134,24 , 185,48 , 233,111 , 134,24 , 113,28 , 141,55 , 85,14 , 113,28 , 141,55 , 85,14 , 2,2 , 2,2 , {69,84,66}, 0,2 , 7,24 , 4,4 , 4,0 , 0,6 , 6,10 , 2, 1, 7, 6, 7 }, // Oromo/Latin/Ethiopia diff --git a/qtbase/src/gui/kernel/qkeysequence.cpp b/qtbase/src/gui/kernel/qkeysequence.cpp index 209d1dd..02141c5 100644 --- a/qtbase/src/gui/kernel/qkeysequence.cpp +++ b/qtbase/src/gui/kernel/qkeysequence.cpp @@ -1207,10 +1207,10 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat // for us, which means that we have to adjust our order here. // The upshot is a lot more infrastructure to keep the number of // if tests down and the code relatively clean. - static const int ModifierOrder[] = { Qt::META, Qt::ALT, Qt::SHIFT, Qt::CTRL, 0 }; + static const int ModifierOrder[] = { Qt::META, Qt::ALT, Qt::SHIFT, Qt::CTRL, Qt::KeypadModifier, 0 }; static const int QtKeyOrder[] = { Qt::Key_Meta, Qt::Key_Alt, Qt::Key_Shift, Qt::Key_Control, 0 }; static const int DontSwapModifierOrder[] = { Qt::CTRL, Qt::ALT, Qt::SHIFT, Qt::META, 0 }; - static const int DontSwapQtKeyOrder[] = { Qt::Key_Control, Qt::Key_Alt, Qt::Key_Shift, Qt::Key_Meta, 0 }; + static const int DontSwapQtKeyOrder[] = { Qt::Key_Control, Qt::Key_Alt, Qt::Key_Shift, Qt::Key_Meta, Qt::KeypadModifier, 0 }; const int *modifierOrder; const int *qtkeyOrder; if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) { diff --git a/qtbase/src/gui/kernel/qshortcutmap.cpp b/qtbase/src/gui/kernel/qshortcutmap.cpp index cad707a..74c637f 100644 --- a/qtbase/src/gui/kernel/qshortcutmap.cpp +++ b/qtbase/src/gui/kernel/qshortcutmap.cpp @@ -378,10 +378,13 @@ QKeySequence::SequenceMatch QShortcutMap::nextState(QKeyEvent *e) d->identicals.resize(0); result = find(e); - if (result == QKeySequence::NoMatch && (e->modifiers() & Qt::KeypadModifier)) { - // Try to find a match without keypad modifier + if (result == QKeySequence::NoMatch) { + // Try to find a match with and without keypad modifier QKeyEvent event = *e; - event.setModifiers(e->modifiers() & ~Qt::KeypadModifier); + if (e->modifiers() & Qt::KeypadModifier) + event.setModifiers(e->modifiers() & ~Qt::KeypadModifier); + else + event.setModifiers((e->modifiers() & ~Qt::ShiftModifier) | Qt::KeypadModifier); result = find(&event); } if (result == QKeySequence::NoMatch && e->modifiers() & Qt::ShiftModifier) { diff --git a/qtbase/src/gui/painting/qpagesize.cpp b/qtbase/src/gui/painting/qpagesize.cpp index 92a1411..d1e6f44 100644 --- a/qtbase/src/gui/painting/qpagesize.cpp +++ b/qtbase/src/gui/painting/qpagesize.cpp @@ -411,7 +411,10 @@ static QPageSize::PageSizeId qt_idForPpdKey(const QString &ppdKey, QSize *match } // Return id name for Windows ID -static QPageSize::PageSizeId qt_idForWindowsID(int windowsId, QSize *match = 0) +// TODO QTBUG-38566 Export to use in QMacPrintEngine as OS X 10.6 thinks call +// to QPageSize::id() is a reserved ObjC keyword, once 10.6 support is dropped +// export can be removed and made a static function again. +Q_GUI_EXPORT QPageSize::PageSizeId qt_idForWindowsID(int windowsId, QSize *match = 0) { // If outside known values then is Custom if (windowsId <= DMPAPER_NONE || windowsId > DMPAPER_LAST) diff --git a/qtbase/src/plugins/platforms/cocoa/qcocoaapplication.mm b/qtbase/src/plugins/platforms/cocoa/qcocoaapplication.mm index bac7635..ee136e0 100644 --- a/qtbase/src/plugins/platforms/cocoa/qcocoaapplication.mm +++ b/qtbase/src/plugins/platforms/cocoa/qcocoaapplication.mm @@ -195,7 +195,7 @@ void qt_redirectNSApplicationSendEvent() // can be unloaded. return; - if ([NSApp isMemberOfClass:[QNSApplication class]]) { + if ([NSApp isMemberOfClass:[QT_MANGLE_NAMESPACE(QNSApplication) class]]) { // No need to change implementation since Qt // already controls a subclass of NSApplication return; @@ -208,7 +208,7 @@ void qt_redirectNSApplicationSendEvent() qt_cocoa_change_implementation( [NSApplication class], @selector(sendEvent:), - [QNSApplication class], + [QT_MANGLE_NAMESPACE(QNSApplication) class], @selector(qt_sendEvent_replacement:), @selector(qt_sendEvent_original:)); } diff --git a/qtbase/src/plugins/platforms/cocoa/qprintengine_mac.mm b/qtbase/src/plugins/platforms/cocoa/qprintengine_mac.mm index a585146..08148f1 100644 --- a/qtbase/src/plugins/platforms/cocoa/qprintengine_mac.mm +++ b/qtbase/src/plugins/platforms/cocoa/qprintengine_mac.mm @@ -53,6 +53,10 @@ QT_BEGIN_NAMESPACE extern QMarginsF qt_convertMargins(const QMarginsF &margins, QPageLayout::Unit fromUnits, QPageLayout::Unit toUnits); +// TODO: QTBUG-38566 Use qt_idForWindowsId() as OS X 10.6 thinks call to +// QPageSize::id() is a reserved ObjC keyword, once 10.6 support is dropped +// this can be removed +extern QPageSize::PageSizeId qt_idForWindowsID(int windowsId, QSize *match = 0); QMacPrintEngine::QMacPrintEngine(QPrinter::PrinterMode mode) : QPaintEngine(*(new QMacPrintEnginePrivate)) { @@ -558,15 +562,18 @@ void QMacPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va d->setPageSize(d->m_printDevice->supportedPageSize(value.toString())); break; case PPK_WindowsPageSize: - d->setPageSize(QPageSize(QPageSize::id(value.toInt()))); + // TODO: QTBUG-38566 Use qt_idForWindowsId() as OS X 10.6 thinks call + // to QPageSize::id() is a reserved ObjC keyword, once support for 10.6 + // is dropped this can be reverted + d->setPageSize(QPageSize(qt_idForWindowsID(value.toInt()))); break; case PPK_PrinterName: { - QString id = value.toString(); - if (id.isEmpty()) - id = QCocoaPrinterSupport().defaultPrintDeviceId(); - else if (!QCocoaPrinterSupport().availablePrintDeviceIds().contains(id)) + QString pid = value.toString(); + if (pid.isEmpty()) + pid = QCocoaPrinterSupport().defaultPrintDeviceId(); + else if (!QCocoaPrinterSupport().availablePrintDeviceIds().contains(pid)) break; - d->m_printDevice = new QCocoaPrintDevice(id); + d->m_printDevice = new QCocoaPrintDevice(pid); PMPrinter printer = d->m_printDevice->macPrinter(); PMRetain(printer); PMSessionSetCurrentPMPrinter(d->session(), printer); diff --git a/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index 90d323e..285b6fb 100644 --- a/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/qtbase/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -175,7 +175,7 @@ void QXcbConnection::xi2SetupDevices() case XIKeyClass: qCDebug(lcQpaXInputDevices) << " it's a keyboard"; break; - case XITouchClass: + case /*XITouchClass*/ 8: // Ubuntu 10.04's X11 headers doesn't have a XITouchClass entry. // will be handled in deviceForId() break; default: diff --git a/qtbase/src/plugins/platformthemes/gtk2/qgtk2dialoghelpers.cpp b/qtbase/src/plugins/platformthemes/gtk2/qgtk2dialoghelpers.cpp index d7e73c8..55dc49c 100644 --- a/qtbase/src/plugins/platformthemes/gtk2/qgtk2dialoghelpers.cpp +++ b/qtbase/src/plugins/platformthemes/gtk2/qgtk2dialoghelpers.cpp @@ -461,7 +461,7 @@ void QGtk2FileDialogHelper::setNameFilters(const QStringList &filters) foreach (const QString &filter, filters) { GtkFileFilter *gtkFilter = gtk_file_filter_new(); - const QString name = filter.left(filter.indexOf(QLatin1Char('('))); + const QString name = filter.left(filter.lastIndexOf(QLatin1Char('('))); const QStringList extensions = cleanFilterList(filter); gtk_file_filter_set_name(gtkFilter, name.isEmpty() ? extensions.join(QStringLiteral(", ")).toUtf8() : name.toUtf8()); diff --git a/qtbase/src/widgets/styles/qmacstyle_mac.mm b/qtbase/src/widgets/styles/qmacstyle_mac.mm index 38c082b..4b34a47 100644 --- a/qtbase/src/widgets/styles/qmacstyle_mac.mm +++ b/qtbase/src/widgets/styles/qmacstyle_mac.mm @@ -879,10 +879,6 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg gbi.size = sz == QAquaSizeSmall ? kHIThemeGrowBoxSizeSmall : kHIThemeGrowBoxSizeNormal; if (HIThemeGetGrowBoxBounds(&p, &gbi, &r) == noErr) { int width = 0; -#ifndef QT_NO_MDIAREA - if (widg && qobject_cast(widg->parentWidget())) - width = r.size.width; -#endif ret = QSize(width, r.size.height); } } @@ -1675,14 +1671,13 @@ void QMacStylePrivate::getSliderInfo(QStyle::ComplexControl cc, const QStyleOpti else tdi->max = 10 * slider->rect.height(); - int range = slider->maximum - slider->minimum; - if (range == 0) { - tdi->value = 0; - } else if (usePlainKnob || slider->orientation == Qt::Horizontal) { + if (usePlainKnob || slider->orientation == Qt::Horizontal) { int endsCorrection = usePlainKnob ? 25 : 10; - tdi->value = (tdi->max + 2 * endsCorrection) * (slider->sliderPosition - slider->minimum) / range - endsCorrection; + tdi->value = (tdi->max + 2 * endsCorrection) * (slider->sliderPosition - slider->minimum) + / (slider->maximum - slider->minimum) - endsCorrection; } else { - tdi->value = (tdi->max + 30) * (slider->sliderPosition - slider->minimum) / range - 20; + tdi->value = (tdi->max + 30) * (slider->sliderPosition - slider->minimum) + / (slider->maximum - slider->minimum) - 20; } } tdi->attributes = kThemeTrackShowThumb; @@ -1848,23 +1843,23 @@ NSView *QMacStylePrivate::cocoaControl(QCocoaWidget widget) const switch (widget.first) { case QCocoaArrowButton: { NSButton *bc = (NSButton *)bv; - bc.buttonType = NSOnOffButton; + [bc setButtonType:NSOnOffButton]; bc.bezelStyle = NSDisclosureBezelStyle; break; } case QCocoaCheckBox: { NSButton *bc = (NSButton *)bv; - bc.buttonType = NSSwitchButton; + [bc setButtonType:NSSwitchButton]; break; } case QCocoaRadioButton: { NSButton *bc = (NSButton *)bv; - bc.buttonType = NSRadioButton; + [bc setButtonType:NSRadioButton]; break; } case QCocoaPushButton: { NSButton *bc = (NSButton *)bv; - bc.buttonType = NSMomentaryPushButton; + [bc setButtonType:NSMomentaryPushButton]; bc.bezelStyle = NSRoundedBezelStyle; break; } @@ -2047,7 +2042,7 @@ void QMacStylePrivate::drawColorlessButton(const HIRect &macRect, HIThemeButtonD QCocoaWidget cw = cocoaWidgetFromHIThemeButtonKind(bdi->kind); NSButton *bc = (NSButton *)cocoaControl(cw); [bc highlight:pressed]; - bc.enabled = bdi->state != kThemeStateUnavailable && bdi->state != kThemeStateUnavailableInactive; + [bc setEnabled:bdi->state != kThemeStateUnavailable && bdi->state != kThemeStateUnavailableInactive]; bc.allowsMixedState = YES; bc.state = bdi->value == kThemeButtonOn ? NSOnState : bdi->value == kThemeButtonMixed ? NSMixedState : NSOffState; @@ -3891,7 +3886,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter cw.first = QCocoaPullDownButton; NSPopUpButton *pdb = (NSPopUpButton *)d->cocoaControl(cw); [pdb highlight:(bdi.state == kThemeStatePressed)]; - pdb.enabled = bdi.state != kThemeStateUnavailable && bdi.state != kThemeStateUnavailableInactive; + [pdb setEnabled:bdi.state != kThemeStateUnavailable && bdi.state != kThemeStateUnavailableInactive]; QRect rect = opt->rect; rect.adjust(0, 0, cw.second == QAquaSizeSmall ? -4 : cw.second == QAquaSizeMini ? -9 : -6, 0); d->drawNSViewInRect(cw, pdb, rect, p, w != 0); @@ -5566,7 +5561,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex sl.minValue = slider->minimum; sl.maxValue = slider->maximum; sl.intValue = slider->sliderValue; - sl.enabled = slider->state & QStyle::State_Enabled; + [sl setEnabled:slider->state & QStyle::State_Enabled]; d->drawNSViewInRect(cw, sl, opt->rect, p, widget != 0, ^(NSRect rect, CGContextRef ctx) { if (slider->upsideDown) { if (isHorizontal) { diff --git a/qtbase/src/widgets/widgets/qmenu.cpp b/qtbase/src/widgets/widgets/qmenu.cpp index 5e5126e..ce2509a 100644 --- a/qtbase/src/widgets/widgets/qmenu.cpp +++ b/qtbase/src/widgets/widgets/qmenu.cpp @@ -2486,7 +2486,7 @@ QMenu::event(QEvent *e) d->mouseDown = 0; d->updateActionRects(); if (d->currentAction) - d->popupAction(d->currentAction, 0, false); + d->setCurrentAction(d->currentAction); break; #ifndef QT_NO_TOOLTIP case QEvent::ToolTip: diff --git a/qtbase/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/qtbase/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 6dfc47a..be8223d 100644 --- a/qtbase/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/qtbase/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -1679,7 +1679,7 @@ void tst_QLocale::negativeNumbers() #include #include -static const int locale_data_count = sizeof(locale_data)/sizeof(locale_data[0]); +static const int locale_data_count = sizeof(qt_locale_data)/sizeof(qt_locale_data[0]); void tst_QLocale::testNames_data() { @@ -1687,7 +1687,7 @@ void tst_QLocale::testNames_data() QTest::addColumn("country"); for (int i = 0; i < locale_data_count; ++i) { - const QLocaleData &item = locale_data[i]; + const QLocaleData &item = qt_locale_data[i]; const QString testName = QString::fromLatin1("data_%1 (%2/%3)").arg(i) .arg(QLocale::languageToString((QLocale::Language)item.m_language_id)) diff --git a/qtbase/tools/configure/configureapp.cpp b/qtbase/tools/configure/configureapp.cpp index a249d29..839cb1e 100644 --- a/qtbase/tools/configure/configureapp.cpp +++ b/qtbase/tools/configure/configureapp.cpp @@ -1379,7 +1379,8 @@ void Configure::parseCmdLine() dictionary[ "QMAKESPEC" ].endsWith("-msvc2008") || dictionary[ "QMAKESPEC" ].endsWith("-msvc2010") || dictionary[ "QMAKESPEC" ].endsWith("-msvc2012") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2013")) { + dictionary[ "QMAKESPEC" ].endsWith("-msvc2013") || + dictionary[ "QMAKESPEC" ].endsWith("-msvc2015")) { if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "nmake"; dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; } else if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) { diff --git a/qtbase/tools/configure/environment.cpp b/qtbase/tools/configure/environment.cpp index 1ef8c10..4cff33a 100644 --- a/qtbase/tools/configure/environment.cpp +++ b/qtbase/tools/configure/environment.cpp @@ -80,6 +80,8 @@ struct CompilerInfo{ {CC_NET2012, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2012 (11.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\11.0", "cl.exe"}, // link.exe, lib.exe {CC_NET2013, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2013 (12.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0", "cl.exe"}, // link.exe, lib.exe {CC_NET2013, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2013 (12.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0", "cl.exe"}, // link.exe, lib.exe + {CC_NET2015, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2013 (14.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0", "cl.exe"}, // link.exe, lib.exe + {CC_NET2015, "Microsoft (R) 32-bit C/C++ Optimizing Compiler.NET 2013 (14.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0", "cl.exe"}, // link.exe, lib.exe {CC_UNKNOWN, "Unknown", 0, 0}, }; @@ -105,6 +107,9 @@ QString Environment::detectQMakeSpec() { QString spec; switch (detectCompiler()) { + case CC_NET2015: + spec = "win32-msvc2015"; + break; case CC_NET2013: spec = "win32-msvc2013"; break; diff --git a/qtbase/tools/configure/environment.h b/qtbase/tools/configure/environment.h index 1a4fbb2..6007ec8 100644 --- a/qtbase/tools/configure/environment.h +++ b/qtbase/tools/configure/environment.h @@ -46,7 +46,8 @@ enum Compiler { CC_NET2008 = 0x90, CC_NET2010 = 0xA0, CC_NET2012 = 0xB0, - CC_NET2013 = 0xC0 + CC_NET2013 = 0xC0, + CC_NET2015 = 0xD0 }; struct CompilerInfo; diff --git a/qttools/src/assistant/assistant/openpagesmanager.cpp b/qttools/src/assistant/assistant/openpagesmanager.cpp index 01ca385..7a8be42 100644 --- a/qttools/src/assistant/assistant/openpagesmanager.cpp +++ b/qttools/src/assistant/assistant/openpagesmanager.cpp @@ -173,13 +173,14 @@ HelpViewer *OpenPagesManager::createPage() void OpenPagesManager::closeCurrentPage() { TRACE_OBJ - Q_ASSERT(m_model->rowCount() > 1); - const QModelIndexList selectedIndexes + if (m_model->rowCount() > 1) { + const QModelIndexList selectedIndexes = m_openPagesWidget->selectionModel()->selectedRows(); - if (selectedIndexes.isEmpty()) + if (selectedIndexes.isEmpty()) return; - Q_ASSERT(selectedIndexes.count() == 1); - removePage(selectedIndexes.first().row()); + if (selectedIndexes.count() == 1) + removePage(selectedIndexes.first().row()); + } } HelpViewer *OpenPagesManager::createPage(const QUrl &url, bool fromSearch)