forked from qt-creator/qt-creator
Fix more warnings
Found by compiling with clang Change-Id: Iec0ed8aa8b6a742a5a3996a6c19c410e209fb048 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -268,7 +268,7 @@ bool ConfigModel::hasChanges(bool initialParameters) const
|
||||
return initialParameters ? i.isInitial : !i.isInitial;
|
||||
});
|
||||
|
||||
return Utils::contains(filtered, [initialParameters](const InternalDataItem &i) {
|
||||
return Utils::contains(filtered, [](const InternalDataItem &i) {
|
||||
return i.isUserChanged || i.isUserNew || i.isUnset;
|
||||
});
|
||||
}
|
||||
|
@@ -40,7 +40,6 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/settingsutils.h>
|
||||
|
||||
static const char groupPostfix[] = "IndentSettings";
|
||||
static const char indentBlockBracesKey[] = "IndentBlockBraces";
|
||||
static const char indentBlockBodyKey[] = "IndentBlockBody";
|
||||
static const char indentClassBracesKey[] = "IndentClassBraces";
|
||||
|
@@ -1576,9 +1576,9 @@ QUrl Model::fileUrl() const
|
||||
QUrl Model::projectUrl() const
|
||||
{
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
DesignDocument *document = QmlDesignerPlugin::instance()->viewManager().currentDesignDocument();
|
||||
if (document)
|
||||
return QUrl::fromLocalFile(document->projectFolder().toString());
|
||||
DesignDocument *document = QmlDesignerPlugin::instance()->viewManager().currentDesignDocument();
|
||||
if (document)
|
||||
return QUrl::fromLocalFile(document->projectFolder().toString());
|
||||
#endif
|
||||
return {};
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ class ProjectStorage;
|
||||
|
||||
using PathCache = SourcePathCache<ProjectStorage<Sqlite::Database>, NonLockingMutex>;
|
||||
|
||||
class FileSystem final : public FileSystemInterface
|
||||
class FileSystem : public FileSystemInterface
|
||||
{
|
||||
public:
|
||||
FileSystem(PathCache &sourcePathCache)
|
||||
|
@@ -1924,6 +1924,8 @@ private:
|
||||
void createTypesAndePropertyDeclarationsTables(Database &database,
|
||||
const Sqlite::Column &foreignModuleIdColumn)
|
||||
{
|
||||
Q_UNUSED(foreignModuleIdColumn)
|
||||
|
||||
Sqlite::Table typesTable;
|
||||
typesTable.setUseIfNotExists(true);
|
||||
typesTable.setName("types");
|
||||
|
@@ -245,11 +245,7 @@ void DesignModeWidget::setup()
|
||||
m_dockManager->setStyleSheet(Theme::replaceCssColors(sheet));
|
||||
|
||||
// Setup icons
|
||||
const QColor iconColor(Theme::getColor(Theme::DStitleBarIcon));
|
||||
|
||||
const QString closeUnicode = Theme::getIconUnicode(Theme::Icon::adsClose);
|
||||
const QString menuUnicode = Theme::getIconUnicode(Theme::Icon::adsDropDown);
|
||||
const QString undockUnicode = Theme::getIconUnicode(Theme::Icon::adsDetach);
|
||||
|
||||
const QString fontName = "qtds_propertyIconFont.ttf";
|
||||
const QSize size = QSize(28, 28);
|
||||
|
@@ -135,8 +135,6 @@ QmlProject::QmlProject(const Utils::FilePath &fileName)
|
||||
disconnect(m_openFileConnection);
|
||||
|
||||
if (target && success) {
|
||||
const Utils::FilePath &folder = projectDirectory() + "/content";
|
||||
|
||||
Utils::FilePaths uiFiles = getUiQmlFilesForFolder(projectDirectory()
|
||||
+ "/content");
|
||||
if (uiFiles.isEmpty())
|
||||
|
@@ -217,7 +217,7 @@ void FileDownloader::probeUrl()
|
||||
QNetworkReply::connect(reply,
|
||||
&QNetworkReply::errorOccurred,
|
||||
this,
|
||||
[this, reply](QNetworkReply::NetworkError) {
|
||||
[this](QNetworkReply::NetworkError) {
|
||||
QQmlData *data = QQmlData::get(this, false);
|
||||
if (!data) {
|
||||
qDebug() << Q_FUNC_INFO << "FileDownloader is nullptr.";
|
||||
|
@@ -209,7 +209,7 @@ struct QtPackage
|
||||
QString displayName;
|
||||
QVersionNumber version;
|
||||
bool installed;
|
||||
bool isPrerelease;
|
||||
bool isPrerelease = false;
|
||||
};
|
||||
|
||||
static QList<QtPackage> availableQtPackages(const QDomDocument &document)
|
||||
|
Reference in New Issue
Block a user