forked from qt-creator/qt-creator
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
@@ -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.
|
||||||
|
@@ -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"));
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user