Skip to content

Commit

Permalink
Make Clang-Tidy happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Oct 25, 2019
1 parent 5b192f4 commit 6595a1b
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 32 deletions.
Expand Up @@ -62,9 +62,9 @@ class FileBrowserWindowPlugin : public QObject, public I18nInterface,
#include "windowinterface.inl"

private:
QAction *mFileBrowserWindowAction;
QAction *mFileBrowserWindowAction = nullptr;

FileBrowserWindowWindow *mFileBrowserWindowWindow;
FileBrowserWindowWindow *mFileBrowserWindowWindow = nullptr;
};

//==============================================================================
Expand Down
Expand Up @@ -62,9 +62,9 @@ class FileOrganiserWindowPlugin : public QObject, public I18nInterface,
#include "windowinterface.inl"

private:
QAction *mFileOrganiserWindowAction;
QAction *mFileOrganiserWindowAction = nullptr;

FileOrganiserWindowWindow *mFileOrganiserWindowWindow;
FileOrganiserWindowWindow *mFileOrganiserWindowWindow = nullptr;
};

//==============================================================================
Expand Down
Expand Up @@ -397,7 +397,7 @@ void FileOrganiserWindowWidget::loadItemSettings(QSettings &pSettings,
} else {
// We are dealing with a file item

if (QFileInfo(textOrPath).exists()) {
if (QFileInfo::exists(textOrPath)) {
pParentItem->appendRow(new FileOrganiserWindowItem(QFileIconProvider().icon(QFileIconProvider::File),
textOrPath));

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/organisation/PMRWindow/src/pmrwindowplugin.h
Expand Up @@ -66,9 +66,9 @@ class PMRWindowPlugin : public QObject, public I18nInterface,
#include "windowinterface.inl"

private:
QAction *mPmrWindowAction;
QAction *mPmrWindowAction = nullptr;

PmrWindowWindow *mPmrWindowWindow;
PmrWindowWindow *mPmrWindowWindow = nullptr;
};

//==============================================================================
Expand Down
Expand Up @@ -71,9 +71,9 @@ class PMRWorkspacesWindowPlugin : public QObject, public I18nInterface,
#include "windowinterface.inl"

private:
QAction *mPmrWorkspacesWindowAction;
QAction *mPmrWorkspacesWindowAction = nullptr;

PmrWorkspacesWindowWindow *mPmrWorkspacesWindowWindow;
PmrWorkspacesWindowWindow *mPmrWorkspacesWindowWindow = nullptr;
};

//==============================================================================
Expand Down
Expand Up @@ -673,7 +673,7 @@ int xdiffCallback(void *data, mmbuffer_t *pBuffer, int pBufferSize)
// Add the given buffer to the given data

for (int i = 0; i < pBufferSize; ++i) {
*static_cast<QString *>(data) += QString(pBuffer[i].ptr).left(int(pBuffer[i].size));
*static_cast<QString *>(data) += QString(pBuffer[i].ptr).leftRef(int(pBuffer[i].size));
}

return 0;
Expand Down Expand Up @@ -795,11 +795,11 @@ QString PmrWorkspacesWindowSynchronizeDialog::diffHtml(DifferencesData &pDiffere
int removeLineNumber = -1;

for (const auto &differenceData : pDifferencesData) {
html += QString(Row).arg(differenceData.operation)
.arg(differenceData.removeLineNumber)
.arg(differenceData.addLineNumber)
.arg(differenceData.tag)
.arg((differenceData.tag == '+')?
html += QString(Row).arg(differenceData.operation,
differenceData.removeLineNumber,
differenceData.addLineNumber,
differenceData.tag,
(differenceData.tag == '+')?
newDiffStrings[++addLineNumber]:
oldDiffStrings[++removeLineNumber]);
}
Expand Down Expand Up @@ -872,11 +872,11 @@ QString PmrWorkspacesWindowSynchronizeDialog::diffHtml(const QString &pOld,

removeLineNumber = QString(difference).remove(BeforeRemoveLineNumberRegEx).remove(AfterLineNumberRegEx).toInt()-1;

html += QString(Row).arg("header")
.arg("...")
.arg("...")
.arg(QString())
.arg(difference);
html += QString(Row).arg("header",
"...",
"...",
QString(),
difference);
} else {
QString diff = difference;
QChar tag = diff[0];
Expand Down Expand Up @@ -910,8 +910,8 @@ QString PmrWorkspacesWindowSynchronizeDialog::diffHtml(const QString &pOld,
"default")
.arg(removeLineNumber)
.arg(addLineNumber)
.arg(QString())
.arg(cleanHtmlEscaped(diff));
.arg(QString(),
cleanHtmlEscaped(diff));
}
}
}
Expand Down
Expand Up @@ -1407,9 +1407,9 @@ void PmrWorkspacesWindowWidget::duplicateCloneMessage(const QString &pUrl,
// (since the message box would show up from nowhere)...

if (mInitialized) {
emit warning(QString("Workspace '%1' is cloned into both '%2' and '%3'").arg(pUrl)
.arg(pPath1)
.arg(pPath2));
emit warning(QString("Workspace '%1' is cloned into both '%2' and '%3'").arg(pUrl,
pPath1,
pPath2));
}
}

Expand Down Expand Up @@ -1662,17 +1662,17 @@ void PmrWorkspacesWindowWidget::aboutWorkspace()
"<table>\n";

if (!workspace->owner().isEmpty()) {
message += Entry.arg(tr("Owner:"))
.arg(workspace->owner());
message += Entry.arg(tr("Owner:"),
workspace->owner());
}

message += Entry.arg(tr("PMR:"))
.arg(QString(R"(<a href="%1">%1</a>)").arg(workspace->url()));
message += Entry.arg(tr("PMR:"),
QString(R"(<a href="%1">%1</a>)").arg(workspace->url()));

if (workspace->isLocal()) {
message += Entry.arg(tr("Path:"))
.arg(QString(R"(<a href="%1">%2</a>)").arg(QUrl::fromLocalFile(workspace->path()).url())
.arg(workspace->path()));
message += Entry.arg(tr("Path:"),
QString(R"(<a href="%1">%2</a>)").arg(QUrl::fromLocalFile(workspace->path()).url(),
workspace->path()));
}

message += "</table>\n";
Expand Down

0 comments on commit 6595a1b

Please sign in to comment.