Fix some warnings

Change-Id: Idc12465aa6a3a3d158f17961f902578ca16d0d7b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2022-03-31 17:24:59 +02:00
parent 91c11c769f
commit 929e40a9f2
4 changed files with 9 additions and 5 deletions

View File

@@ -213,6 +213,7 @@ bool Evaluate::visit(AST::UiQualifiedId *ast)
bool Evaluate::visit(AST::TemplateLiteral *ast) bool Evaluate::visit(AST::TemplateLiteral *ast)
{ {
Q_UNUSED(ast)
_result = _valueOwner->stringValue(); _result = _valueOwner->stringValue();
return false; return false;
} }

View File

@@ -48,6 +48,8 @@
#include <QApplication> #include <QApplication>
#include <QPushButton> #include <QPushButton>
#include <memory>
namespace CodePaster { namespace CodePaster {
Protocol::Protocol() Protocol::Protocol()
@@ -215,19 +217,19 @@ bool NetworkProtocol::httpStatus(QString url, QString *errorMessage, bool useHtt
url.prepend(useHttps ? httpsPrefix : httpPrefix); url.prepend(useHttps ? httpsPrefix : httpPrefix);
url.append(QLatin1Char('/')); url.append(QLatin1Char('/'));
} }
QScopedPointer<QNetworkReply> reply(httpGet(url)); std::unique_ptr<QNetworkReply> reply(httpGet(url));
QMessageBox box(QMessageBox::Information, QMessageBox box(QMessageBox::Information,
tr("Checking connection"), tr("Checking connection"),
tr("Connecting to %1...").arg(url), tr("Connecting to %1...").arg(url),
QMessageBox::Cancel, QMessageBox::Cancel,
Core::ICore::dialogParent()); Core::ICore::dialogParent());
connect(reply.data(), &QNetworkReply::finished, &box, &QWidget::close); connect(reply.get(), &QNetworkReply::finished, &box, &QWidget::close);
QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::setOverrideCursor(Qt::WaitCursor);
box.exec(); box.exec();
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
// User canceled, discard and be happy. // User canceled, discard and be happy.
if (!reply->isFinished()) { if (!reply->isFinished()) {
QNetworkReply *replyPtr = reply.take(); QNetworkReply *replyPtr = reply.release();
connect(replyPtr, &QNetworkReply::finished, replyPtr, &QNetworkReply::deleteLater); connect(replyPtr, &QNetworkReply::finished, replyPtr, &QNetworkReply::deleteLater);
return false; return false;
} }

View File

@@ -1208,6 +1208,7 @@ QFileDevice::Permissions DockerDevice::permissions(const FilePath &filePath) con
bool DockerDevice::setPermissions(const FilePath &filePath, QFileDevice::Permissions permissions) const bool DockerDevice::setPermissions(const FilePath &filePath, QFileDevice::Permissions permissions) const
{ {
Q_UNUSED(permissions)
QTC_ASSERT(handlesFile(filePath), return {}); QTC_ASSERT(handlesFile(filePath), return {});
updateContainerAccess(); updateContainerAccess();
QTC_CHECK(false); // FIXME: Implement. QTC_CHECK(false); // FIXME: Implement.

View File

@@ -727,9 +727,9 @@ WelcomeMode::WelcomeMode()
QShortcut *updateShortcut = nullptr; QShortcut *updateShortcut = nullptr;
if (Utils::HostOsInfo::isMacHost()) if (Utils::HostOsInfo::isMacHost())
updateShortcut = new QShortcut(QKeySequence(Qt::ALT + Qt::Key_F5), m_modeWidget); updateShortcut = new QShortcut(QKeySequence(Qt::ALT | Qt::Key_F5), m_modeWidget);
else else
updateShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F5), m_modeWidget); updateShortcut = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_F5), m_modeWidget);
connect(updateShortcut, &QShortcut::activated, this, [this, welcomePagePath](){ connect(updateShortcut, &QShortcut::activated, this, [this, welcomePagePath](){
m_modeWidget->setSource(QUrl::fromLocalFile(welcomePagePath + "/main.qml")); m_modeWidget->setSource(QUrl::fromLocalFile(welcomePagePath + "/main.qml"));
}); });