forked from qt-creator/qt-creator
Fix a number of compiler warnings
Change-Id: I3e71bffb2099d896742a6fca77febe20e2076464 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -120,7 +120,11 @@ static clang::format::FormatStyle qtcStyle()
|
|||||||
style.ExperimentalAutoDetectBinPacking = false;
|
style.ExperimentalAutoDetectBinPacking = false;
|
||||||
style.FixNamespaceComments = true;
|
style.FixNamespaceComments = true;
|
||||||
style.ForEachMacros = {"forever", "foreach", "Q_FOREACH", "BOOST_FOREACH"};
|
style.ForEachMacros = {"forever", "foreach", "Q_FOREACH", "BOOST_FOREACH"};
|
||||||
|
#if LLVM_VERSION_MAJOR >= 12
|
||||||
|
style.IncludeStyle.IncludeCategories = {{"^<Q.*", 200, 200, true}};
|
||||||
|
#else
|
||||||
style.IncludeStyle.IncludeCategories = {{"^<Q.*", 200, 200}};
|
style.IncludeStyle.IncludeCategories = {{"^<Q.*", 200, 200}};
|
||||||
|
#endif
|
||||||
style.IncludeStyle.IncludeIsMainRegex = "(Test)?$";
|
style.IncludeStyle.IncludeIsMainRegex = "(Test)?$";
|
||||||
style.IndentCaseLabels = false;
|
style.IndentCaseLabels = false;
|
||||||
style.IndentWidth = 4;
|
style.IndentWidth = 4;
|
||||||
|
@@ -334,7 +334,7 @@ auto removeAndExtractTemplate(QString type)
|
|||||||
QString templateParameter;
|
QString templateParameter;
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
int start = 0;
|
int start = 0;
|
||||||
int templateStart;
|
int templateStart = 0;
|
||||||
for (int i = 0; i < type.length(); ++i) {
|
for (int i = 0; i < type.length(); ++i) {
|
||||||
auto c = type[i];
|
auto c = type[i];
|
||||||
if (c == '<') {
|
if (c == '<') {
|
||||||
|
@@ -1665,8 +1665,8 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
|
|||||||
: locationsEnabled ? tr("Disable Location") : tr("Enable Location"),
|
: locationsEnabled ? tr("Disable Location") : tr("Enable Location"),
|
||||||
!selectedLocations.isEmpty() && handlesIndividualLocations,
|
!selectedLocations.isEmpty() && handlesIndividualLocations,
|
||||||
[this, selectedLocations, locationsEnabled] {
|
[this, selectedLocations, locationsEnabled] {
|
||||||
for (const SubBreakpoint &sbp : selectedLocations)
|
for (SubBreakpointItem * const sbp : selectedLocations)
|
||||||
requestSubBreakpointEnabling(sbp, !locationsEnabled);
|
requestSubBreakpointEnabling(QPointer(sbp), !locationsEnabled);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -186,7 +186,7 @@ QList<FilePath> DesktopDevice::directoryEntries(const FilePath &filePath,
|
|||||||
{
|
{
|
||||||
QTC_CHECK(!filePath.needsDevice());
|
QTC_CHECK(!filePath.needsDevice());
|
||||||
const QDir dir(filePath.path());
|
const QDir dir(filePath.path());
|
||||||
const QFileInfoList entryInfoList = dir.entryInfoList(nameFilters, filters);
|
const QFileInfoList entryInfoList = dir.entryInfoList(nameFilters, filters, sort);
|
||||||
return Utils::transform(entryInfoList, &FilePath::fromFileInfo);
|
return Utils::transform(entryInfoList, &FilePath::fromFileInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -357,6 +357,7 @@ QByteArray IDevice::fileContents(const FilePath &filePath, qint64 limit, qint64
|
|||||||
{
|
{
|
||||||
Q_UNUSED(filePath);
|
Q_UNUSED(filePath);
|
||||||
Q_UNUSED(limit);
|
Q_UNUSED(limit);
|
||||||
|
Q_UNUSED(offset);
|
||||||
QTC_CHECK(false);
|
QTC_CHECK(false);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
@@ -631,7 +631,7 @@ void AlignDistribute::distributeSpacing(Dimension dimension,
|
|||||||
QTC_ASSERT(!modelNode.isRootNode(), continue);
|
QTC_ASSERT(!modelNode.isRootNode(), continue);
|
||||||
if (QmlItemNode::isValidQmlItemNode(modelNode)) {
|
if (QmlItemNode::isValidQmlItemNode(modelNode)) {
|
||||||
QmlItemNode qmlItemNode(modelNode);
|
QmlItemNode qmlItemNode(modelNode);
|
||||||
qreal parentPos;
|
qreal parentPos = 0;
|
||||||
QByteArray propertyName;
|
QByteArray propertyName;
|
||||||
switch (dimension) {
|
switch (dimension) {
|
||||||
case Dimension::X: {
|
case Dimension::X: {
|
||||||
|
@@ -573,7 +573,7 @@ public:
|
|||||||
friend bool operator==(const ImportView &first, const ImportView &second)
|
friend bool operator==(const ImportView &first, const ImportView &second)
|
||||||
{
|
{
|
||||||
return first.name == second.name
|
return first.name == second.name
|
||||||
&& first.version == second.version & first.sourceId == second.sourceId;
|
&& first.version == second.version && first.sourceId == second.sourceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@@ -270,7 +270,7 @@ void SettingsPageWidget::apply()
|
|||||||
DesignerSettingsKey::ENABLE_TIMELINEVIEW
|
DesignerSettingsKey::ENABLE_TIMELINEVIEW
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const QByteArray &key : restartNecessaryKeys) {
|
for (const char * const key : restartNecessaryKeys) {
|
||||||
if (currentSettings.value(key) != newSettings.value(key)) {
|
if (currentSettings.value(key) != newSettings.value(key)) {
|
||||||
QMessageBox::information(Core::ICore::dialogParent(), tr("Restart Required"),
|
QMessageBox::information(Core::ICore::dialogParent(), tr("Restart Required"),
|
||||||
tr("The made changes will take effect after a "
|
tr("The made changes will take effect after a "
|
||||||
|
@@ -162,6 +162,7 @@ QList<ToolChain *> WebAssemblyToolChainFactory::autoDetect(
|
|||||||
const IDevice::Ptr &device)
|
const IDevice::Ptr &device)
|
||||||
{
|
{
|
||||||
Q_UNUSED(alreadyKnown)
|
Q_UNUSED(alreadyKnown)
|
||||||
|
Q_UNUSED(device)
|
||||||
|
|
||||||
const FilePath sdk = WebAssemblyEmSdk::registeredEmSdk();
|
const FilePath sdk = WebAssemblyEmSdk::registeredEmSdk();
|
||||||
if (!WebAssemblyEmSdk::isValid(sdk))
|
if (!WebAssemblyEmSdk::isValid(sdk))
|
||||||
|
Reference in New Issue
Block a user