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)
{
Q_UNUSED(ast)
_result = _valueOwner->stringValue();
return false;
}

View File

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

View File

@@ -727,9 +727,9 @@ WelcomeMode::WelcomeMode()
QShortcut *updateShortcut = nullptr;
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
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](){
m_modeWidget->setSource(QUrl::fromLocalFile(welcomePagePath + "/main.qml"));
});