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