forked from qt-creator/qt-creator
Fix various compiler warnings
Change-Id: Ib64f04f154b2c44dad3248ef038449c2ac628686 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -67,7 +67,6 @@ private:
|
|||||||
QLineEdit *m_name = nullptr;
|
QLineEdit *m_name = nullptr;
|
||||||
PathChooser *m_java = nullptr;
|
PathChooser *m_java = nullptr;
|
||||||
PathChooser *m_ls = nullptr;
|
PathChooser *m_ls = nullptr;
|
||||||
PathChooser *m_workspace = nullptr;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
JLSSettingsWidget::JLSSettingsWidget(const JLSSettings *settings, QWidget *parent)
|
JLSSettingsWidget::JLSSettingsWidget(const JLSSettings *settings, QWidget *parent)
|
||||||
|
@@ -2489,7 +2489,7 @@ static void semanticHighlighter(QFutureInterface<HighlightingResult> &future,
|
|||||||
const Position endPos = startPos.withOffset(token.length, &doc);
|
const Position endPos = startPos.withOffset(token.length, &doc);
|
||||||
return Range(startPos, endPos);
|
return Range(startPos, endPos);
|
||||||
};
|
};
|
||||||
const auto isOutputParameter = [&ast, &doc, &tokenRange](const ExpandedSemanticToken &token) {
|
const auto isOutputParameter = [&ast, &tokenRange](const ExpandedSemanticToken &token) {
|
||||||
if (token.modifiers.contains("usedAsMutableReference"))
|
if (token.modifiers.contains("usedAsMutableReference"))
|
||||||
return true;
|
return true;
|
||||||
if (token.type != "variable" && token.type != "property" && token.type != "parameter")
|
if (token.type != "variable" && token.type != "property" && token.type != "parameter")
|
||||||
|
@@ -135,7 +135,7 @@ CppEditor::CppCodeStyleSettings ClangFormatFile::toCppCodeStyleSettings(
|
|||||||
|
|
||||||
// Modifier offset should be opposite to indent width in order indentAccessSpecifiers
|
// Modifier offset should be opposite to indent width in order indentAccessSpecifiers
|
||||||
// to be false
|
// to be false
|
||||||
settings.indentAccessSpecifiers = (style.AccessModifierOffset != -1 * style.IndentWidth);
|
settings.indentAccessSpecifiers = (style.AccessModifierOffset != -1 * int(style.IndentWidth));
|
||||||
|
|
||||||
settings.indentNamespaceBody = style.NamespaceIndentation
|
settings.indentNamespaceBody = style.NamespaceIndentation
|
||||||
== FormatStyle::NamespaceIndentationKind::NI_All;
|
== FormatStyle::NamespaceIndentationKind::NI_All;
|
||||||
|
@@ -479,7 +479,7 @@ void GitPluginPrivate::onApplySettings()
|
|||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
m_settings.gitExecutable(&gitFoundOk, &errorMessage);
|
m_settings.gitExecutable(&gitFoundOk, &errorMessage);
|
||||||
if (!gitFoundOk) {
|
if (!gitFoundOk) {
|
||||||
QTimer::singleShot(0, this, [this, errorMessage] {
|
QTimer::singleShot(0, this, [errorMessage] {
|
||||||
Core::AsynchronousMessageBox::warning(tr("Git Settings"), errorMessage);
|
Core::AsynchronousMessageBox::warning(tr("Git Settings"), errorMessage);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -633,13 +633,6 @@ static QFileInfoList targetDescriptionFiles(const Utils::FilePath &dir)
|
|||||||
return kitsDir.entryInfoList();
|
return kitsDir.entryInfoList();
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString extractQulVersion(const QByteArray &data)
|
|
||||||
{
|
|
||||||
const QJsonDocument document = QJsonDocument::fromJson(data);
|
|
||||||
const QJsonObject target = document.object();
|
|
||||||
return target.value("qulVersion").toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
static McuTargetDescription parseDescriptionJsonCommon(const QString &qulVersion, const QJsonObject &target)
|
static McuTargetDescription parseDescriptionJsonCommon(const QString &qulVersion, const QJsonObject &target)
|
||||||
{
|
{
|
||||||
const QString compatVersion = target.value("compatVersion").toString();
|
const QString compatVersion = target.value("compatVersion").toString();
|
||||||
|
@@ -121,7 +121,7 @@ void OutputTaskParser::runPostPrintActions(QPlainTextEdit *edit)
|
|||||||
{
|
{
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
if (const auto ow = qobject_cast<Core::OutputWindow *>(edit)) {
|
if (const auto ow = qobject_cast<Core::OutputWindow *>(edit)) {
|
||||||
Utils::reverseForeach(taskInfo(), [this, ow, &offset](const TaskInfo &ti) {
|
Utils::reverseForeach(taskInfo(), [ow, &offset](const TaskInfo &ti) {
|
||||||
ow->registerPositionOf(ti.task.taskId, ti.linkedLines, ti.skippedLines, offset);
|
ow->registerPositionOf(ti.task.taskId, ti.linkedLines, ti.skippedLines, offset);
|
||||||
offset += ti.linkedLines;
|
offset += ti.linkedLines;
|
||||||
});
|
});
|
||||||
|
@@ -96,7 +96,6 @@ QString Theme::replaceCssColors(const QString &input)
|
|||||||
{
|
{
|
||||||
const QRegularExpression rx("creatorTheme\\.(\\w+)");
|
const QRegularExpression rx("creatorTheme\\.(\\w+)");
|
||||||
|
|
||||||
int pos = 0;
|
|
||||||
QString output = input;
|
QString output = input;
|
||||||
|
|
||||||
QRegularExpressionMatchIterator it = rx.globalMatch(input);
|
QRegularExpressionMatchIterator it = rx.globalMatch(input);
|
||||||
@@ -119,7 +118,6 @@ QString Theme::replaceCssColors(const QString &input)
|
|||||||
.arg(color.alpha());
|
.arg(color.alpha());
|
||||||
output.replace(replaceExp, rgbaStr + "\\1");
|
output.replace(replaceExp, rgbaStr + "\\1");
|
||||||
}
|
}
|
||||||
pos += match.capturedLength();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
|
@@ -120,7 +120,7 @@ Edit3DWidget::Edit3DWidget(Edit3DView *view) :
|
|||||||
view->setSeeker(seeker);
|
view->setSeeker(seeker);
|
||||||
seeker->setToolTip(QLatin1String("Seek particle system time when paused."));
|
seeker->setToolTip(QLatin1String("Seek particle system time when paused."));
|
||||||
|
|
||||||
QObject::connect(seeker, &SeekerSlider::positionChanged, [this, seeker](){
|
QObject::connect(seeker, &SeekerSlider::positionChanged, [seeker](){
|
||||||
QmlDesignerPlugin::instance()->viewManager().nodeInstanceView()
|
QmlDesignerPlugin::instance()->viewManager().nodeInstanceView()
|
||||||
->view3DAction(View3DSeekActionCommand(seeker->position()));
|
->view3DAction(View3DSeekActionCommand(seeker->position()));
|
||||||
});
|
});
|
||||||
|
@@ -661,7 +661,7 @@ void ItemLibraryAssetImporter::finalizeQuick3DImport()
|
|||||||
QTimer *timer = new QTimer(parent());
|
QTimer *timer = new QTimer(parent());
|
||||||
static int counter;
|
static int counter;
|
||||||
counter = 0;
|
counter = 0;
|
||||||
timer->callOnTimeout([this, timer, progressTitle, model, doc]() {
|
timer->callOnTimeout([this, timer, progressTitle, model]() {
|
||||||
if (!isCancelled()) {
|
if (!isCancelled()) {
|
||||||
notifyProgress(++counter * 5, progressTitle);
|
notifyProgress(++counter * 5, progressTitle);
|
||||||
if (counter < 10) {
|
if (counter < 10) {
|
||||||
|
@@ -806,8 +806,8 @@ void TimelineRulerSectionItem::setPlaybackLoopEnabled(bool value)
|
|||||||
void TimelineRulerSectionItem::setPlaybackLoopTimes(float startFrame, float endFrame)
|
void TimelineRulerSectionItem::setPlaybackLoopTimes(float startFrame, float endFrame)
|
||||||
{
|
{
|
||||||
if (m_playbackLoopEnabled) {
|
if (m_playbackLoopEnabled) {
|
||||||
startFrame = startFrame;
|
m_start = startFrame;
|
||||||
endFrame = endFrame;
|
m_end = endFrame;
|
||||||
m_playbackLoopStart = startFrame > m_duration ? m_duration : startFrame < 0.0 ? 0.0 : startFrame;
|
m_playbackLoopStart = startFrame > m_duration ? m_duration : startFrame < 0.0 ? 0.0 : startFrame;
|
||||||
m_playbackLoopEnd = endFrame > m_duration ? m_duration : endFrame < 0.0 ? 0.0 : endFrame;
|
m_playbackLoopEnd = endFrame > m_duration ? m_duration : endFrame < 0.0 ? 0.0 : endFrame;
|
||||||
emit playbackLoopValuesChanged();
|
emit playbackLoopValuesChanged();
|
||||||
|
@@ -555,7 +555,7 @@ public:
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
explicit PropertyDeclaration(Utils::SmallStringView name,
|
explicit PropertyDeclaration(Utils::SmallStringView name,
|
||||||
TypeId propetyTypeId,
|
TypeId propertyTypeId,
|
||||||
PropertyDeclarationTraits traits,
|
PropertyDeclarationTraits traits,
|
||||||
Utils::SmallStringView aliasPropertyName)
|
Utils::SmallStringView aliasPropertyName)
|
||||||
: name{name}
|
: name{name}
|
||||||
|
Reference in New Issue
Block a user