Qmake: Handle QFlags deprecation

Change-Id: I2565ce0b1b10d4cb663dc6ad2721b717ce48c17d
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2020-01-29 07:45:27 +01:00
parent 10537d8469
commit 597445ff06
4 changed files with 6 additions and 6 deletions

View File

@@ -118,7 +118,7 @@ bool ClangQueryProjectsFindFilter::showSearchTermInput() const
Core::FindFlags ClangQueryProjectsFindFilter::supportedFindFlags() const Core::FindFlags ClangQueryProjectsFindFilter::supportedFindFlags() const
{ {
return nullptr; return {};
} }
void ClangQueryProjectsFindFilter::setProjectParts(const std::vector<CppTools::ProjectPart::Ptr> &projectParts) void ClangQueryProjectsFindFilter::setProjectParts(const std::vector<CppTools::ProjectPart::Ptr> &projectParts)

View File

@@ -120,7 +120,7 @@ QString LibraryDetailsController::libraryPlatformFilter() const
void LibraryDetailsController::updateGui() void LibraryDetailsController::updateGui()
{ {
// read values from gui // read values from gui
m_platforms = nullptr; m_platforms = {};
if (libraryDetailsWidget()->linCheckBox->isChecked()) if (libraryDetailsWidget()->linCheckBox->isChecked())
m_platforms |= AddLibraryWizard::LinuxPlatform; m_platforms |= AddLibraryWizard::LinuxPlatform;
if (libraryDetailsWidget()->macCheckBox->isChecked()) if (libraryDetailsWidget()->macCheckBox->isChecked())
@@ -448,7 +448,7 @@ static QString generateLibsSnippet(AddLibraryWizard::Platforms platforms,
| AddLibraryWizard::WindowsMSVCPlatform); | AddLibraryWizard::WindowsMSVCPlatform);
AddLibraryWizard::Platforms diffPlatforms = platforms ^ commonPlatforms; AddLibraryWizard::Platforms diffPlatforms = platforms ^ commonPlatforms;
AddLibraryWizard::Platforms generatedPlatforms = nullptr; AddLibraryWizard::Platforms generatedPlatforms;
QString snippetMessage; QString snippetMessage;
QTextStream str(&snippetMessage); QTextStream str(&snippetMessage);
@@ -534,7 +534,7 @@ static QString generatePreTargetDepsSnippet(AddLibraryWizard::Platforms platform
QString snippetMessage; QString snippetMessage;
QTextStream str(&snippetMessage); QTextStream str(&snippetMessage);
str << "\n"; str << "\n";
AddLibraryWizard::Platforms generatedPlatforms = nullptr; AddLibraryWizard::Platforms generatedPlatforms;
AddLibraryWizard::Platforms windowsPlatforms = platforms AddLibraryWizard::Platforms windowsPlatforms = platforms
& (AddLibraryWizard::WindowsMinGWPlatform | AddLibraryWizard::WindowsMSVCPlatform); & (AddLibraryWizard::WindowsMinGWPlatform | AddLibraryWizard::WindowsMSVCPlatform);
AddLibraryWizard::Platforms commonPlatforms = platforms; AddLibraryWizard::Platforms commonPlatforms = platforms;

View File

@@ -520,7 +520,7 @@ void QmakeProjectManagerPlugin::testMakefileParser()
QCOMPARE(Utils::QtcProcess::splitArgs(parser.unparsedArguments()), QCOMPARE(Utils::QtcProcess::splitArgs(parser.unparsedArguments()),
Utils::QtcProcess::splitArgs(unparsedArguments)); Utils::QtcProcess::splitArgs(unparsedArguments));
QCOMPARE(parser.effectiveBuildConfig(nullptr), effectiveBuildConfig); QCOMPARE(parser.effectiveBuildConfig({}), effectiveBuildConfig);
const QMakeStepConfig qmsc = parser.config(); const QMakeStepConfig qmsc = parser.config();
QCOMPARE(qmsc.archConfig, static_cast<QMakeStepConfig::TargetArchConfig>(archConfig)); QCOMPARE(qmsc.archConfig, static_cast<QMakeStepConfig::TargetArchConfig>(archConfig));

View File

@@ -138,7 +138,7 @@ void CostDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
// Draw text. // Draw text.
QLocale loc = opt.locale; QLocale loc = opt.locale;
loc.setNumberOptions(nullptr); loc.setNumberOptions({});
const QString text = d->displayText(index, loc); const QString text = d->displayText(index, loc);
const QBrush &textBrush = (option.state & QStyle::State_Selected ? opt.palette.highlightedText() : opt.palette.text()); const QBrush &textBrush = (option.state & QStyle::State_Selected ? opt.palette.highlightedText() : opt.palette.text());
painter->setBrush(Qt::NoBrush); painter->setBrush(Qt::NoBrush);