diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-08-24 03:01:46 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-08-24 03:01:47 +0200 |
commit | 2474c78debe48c7b81d0b4e1795342cdedfdd3a3 (patch) | |
tree | c232f21d8acbc498eaddbeccb61fc812f514ffea | |
parent | cfaad49b7cc69df057153cb86681556addbe6906 (diff) | |
parent | 6a5fb1ef73fc7a917efe3670fcdfa7aa6e09df86 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I43a657af3d3c5853bd062f14e3b96b87cdadea94
-rw-r--r-- | src/assistant/assistant/mainwindow.cpp | 2 | ||||
-rw-r--r-- | src/assistant/assistant/preferencesdialog.cpp | 55 | ||||
-rw-r--r-- | src/assistant/assistant/preferencesdialog.h | 4 | ||||
-rw-r--r-- | src/distancefieldgenerator/mainwindow.cpp | 2 | ||||
-rw-r--r-- | src/qdoc/clangcodeparser.cpp | 6 |
5 files changed, 31 insertions, 38 deletions
diff --git a/src/assistant/assistant/mainwindow.cpp b/src/assistant/assistant/mainwindow.cpp index 2b9c87bbf..fc5fe5b3f 100644 --- a/src/assistant/assistant/mainwindow.cpp +++ b/src/assistant/assistant/mainwindow.cpp @@ -842,7 +842,7 @@ void MainWindow::showPreferences() m_centralWidget, &CentralWidget::updateBrowserFont); connect(&dia, &PreferencesDialog::updateUserInterface, m_centralWidget, &CentralWidget::updateUserInterface); - dia.showDialog(); + dia.exec(); } void MainWindow::syncContents() diff --git a/src/assistant/assistant/preferencesdialog.cpp b/src/assistant/assistant/preferencesdialog.cpp index 7955e08df..67f91326c 100644 --- a/src/assistant/assistant/preferencesdialog.cpp +++ b/src/assistant/assistant/preferencesdialog.cpp @@ -142,31 +142,6 @@ PreferencesDialog::PreferencesDialog(QWidget *parent) setFont(helpEngine.appFont()); } -PreferencesDialog::~PreferencesDialog() -{ - if (m_appFontChanged) { - helpEngine.setAppFont(m_appFontPanel->selectedFont()); - helpEngine.setUseAppFont(m_appFontPanel->isChecked()); - helpEngine.setAppWritingSystem(m_appFontPanel->writingSystem()); - emit updateApplicationFont(); - } - - if (m_browserFontChanged) { - helpEngine.setBrowserFont(m_browserFontPanel->selectedFont()); - helpEngine.setUseBrowserFont(m_browserFontPanel->isChecked()); - helpEngine.setBrowserWritingSystem(m_browserFontPanel->writingSystem()); - emit updateBrowserFont(); - } - - QString homePage = m_ui.homePageLineEdit->text(); - if (homePage.isEmpty()) - homePage = QLatin1String("help"); - helpEngine.setHomePage(homePage); - - int option = m_ui.helpStartComboBox->currentIndex(); - helpEngine.setStartOption(option); -} - FilterSetup PreferencesDialog::readOriginalSetup() const { FilterSetup filterSetup; @@ -195,12 +170,6 @@ FilterSetup PreferencesDialog::readOriginalSetup() const return filterSetup; } -void PreferencesDialog::showDialog() -{ - if (exec() != Accepted) - m_appFontChanged = m_browserFontChanged = false; -} - void PreferencesDialog::updateFilterPage() { if (m_hideFiltersTab) @@ -563,6 +532,30 @@ void PreferencesDialog::applyChanges() helpEngine.setShowTabs(m_ui.showTabs->isChecked()); if (m_showTabs != m_ui.showTabs->isChecked()) emit updateUserInterface(); + + if (m_appFontChanged) { + helpEngine.setAppFont(m_appFontPanel->selectedFont()); + helpEngine.setUseAppFont(m_appFontPanel->isChecked()); + helpEngine.setAppWritingSystem(m_appFontPanel->writingSystem()); + emit updateApplicationFont(); + m_appFontChanged = false; + } + + if (m_browserFontChanged) { + helpEngine.setBrowserFont(m_browserFontPanel->selectedFont()); + helpEngine.setUseBrowserFont(m_browserFontPanel->isChecked()); + helpEngine.setBrowserWritingSystem(m_browserFontPanel->writingSystem()); + emit updateBrowserFont(); + m_browserFontChanged = false; + } + + QString homePage = m_ui.homePageLineEdit->text(); + if (homePage.isEmpty()) + homePage = QLatin1String("help"); + helpEngine.setHomePage(homePage); + + const int option = m_ui.helpStartComboBox->currentIndex(); + helpEngine.setStartOption(option); } void PreferencesDialog::updateFontSettingsPage() diff --git a/src/assistant/assistant/preferencesdialog.h b/src/assistant/assistant/preferencesdialog.h index 89c30c568..1ff39e326 100644 --- a/src/assistant/assistant/preferencesdialog.h +++ b/src/assistant/assistant/preferencesdialog.h @@ -29,6 +29,7 @@ #ifndef PREFERENCESDIALOG_H #define PREFERENCESDIALOG_H +#include <QtCore/QVersionNumber> #include <QtWidgets/QDialog> #include <QtHelp/QHelpFilterData> #include "ui_preferencesdialog.h" @@ -60,9 +61,6 @@ class PreferencesDialog : public QDialog public: PreferencesDialog(QWidget *parent = nullptr); - ~PreferencesDialog() override; - - void showDialog(); private slots: void filterSelected(QListWidgetItem *item); diff --git a/src/distancefieldgenerator/mainwindow.cpp b/src/distancefieldgenerator/mainwindow.cpp index 3717330b4..ee4475ada 100644 --- a/src/distancefieldgenerator/mainwindow.cpp +++ b/src/distancefieldgenerator/mainwindow.cpp @@ -551,7 +551,7 @@ QByteArray MainWindow::createSfntTable() glyphRecord.boundingRectY = qToBigEndian(TO_FIXED_POINT(glyphData.boundingRect.y())); glyphRecord.boundingRectWidth = qToBigEndian(TO_FIXED_POINT(glyphData.boundingRect.width())); glyphRecord.boundingRectHeight = qToBigEndian(TO_FIXED_POINT(glyphData.boundingRect.height())); - glyphRecord.textureIndex = qToBigEndian(glyphData.textureIndex); + glyphRecord.textureIndex = qToBigEndian(quint16(glyphData.textureIndex)); buffer.write(reinterpret_cast<char *>(&glyphRecord), sizeof(QtdfGlyphRecord)); int expectedWidth = qCeil(glyphData.texCoord.width + glyphData.texCoord.xMargin * 2); diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index bbe3f9ba7..475becf4d 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -1127,13 +1127,14 @@ static const char *defaultArgs_[] = { "-DQ_QDOC", "-DQ_CLANG_QDOC", "-DQT_DISABLE_DEPRECATED_BEFORE=0", - "-DQT_ANNOTATE_CLASS(type,...)=static_assert(sizeof(#__VA_ARGS__), #type);", - "-DQT_ANNOTATE_CLASS2(type,a1,a2)=static_assert(sizeof(#a1, #a2), #type);", + "-DQT_ANNOTATE_CLASS(type,...)=static_assert(sizeof(#__VA_ARGS__),#type);", + "-DQT_ANNOTATE_CLASS2(type,a1,a2)=static_assert(sizeof(#a1,#a2),#type);", "-DQT_ANNOTATE_FUNCTION(a)=__attribute__((annotate(#a)))", "-DQT_ANNOTATE_ACCESS_SPECIFIER(a)=__attribute__((annotate(#a)))", "-Wno-constant-logical-operand", "-Wno-macro-redefined", "-Wno-nullability-completeness", + "-ferror-limit=0", "-I" CLANG_RESOURCE_DIR }; @@ -1304,6 +1305,7 @@ void ClangCodeParser::buildPCH() out << line << "\n"; } } + tmpHeaderFile.close(); } if (printParsingErrors_ == 0) Location::logToStdErrAlways("clang not printing errors; include paths were guessed"); |