From 008b1c94c27cb11c7a1e820d4f61c144d99a5c05 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 6 Feb 2025 14:02:56 +0100 Subject: [PATCH] Perforce: Remove dead ends Detected by Axivion plugin. Change-Id: I8be6968d8f485528f936526b676b2ff8e8c0f0ba Reviewed-by: Orgad Shaneh --- src/plugins/perforce/perforcechecker.cpp | 12 ++---------- src/plugins/perforce/perforcechecker.h | 1 - src/plugins/perforce/perforceplugin.cpp | 17 ----------------- src/plugins/perforce/perforcesettings.h | 1 - 4 files changed, 2 insertions(+), 29 deletions(-) diff --git a/src/plugins/perforce/perforcechecker.cpp b/src/plugins/perforce/perforcechecker.cpp index 9eb66ef45c0..8389ec73a95 100644 --- a/src/plugins/perforce/perforcechecker.cpp +++ b/src/plugins/perforce/perforcechecker.cpp @@ -16,8 +16,7 @@ using namespace Utils; -namespace Perforce { -namespace Internal { +namespace Perforce::Internal { PerforceChecker::PerforceChecker(QObject *parent) : QObject(parent) { @@ -186,16 +185,9 @@ void PerforceChecker::emitSucceeded(const QString &m) emit succeeded(FilePath::fromString(m)); } -bool PerforceChecker::useOverideCursor() const -{ - return m_useOverideCursor; -} - void PerforceChecker::setUseOverideCursor(bool v) { m_useOverideCursor = v; } -} -} - +} // Perforce::Internal diff --git a/src/plugins/perforce/perforcechecker.h b/src/plugins/perforce/perforcechecker.h index 5f7d2b16739..36958c0fc32 100644 --- a/src/plugins/perforce/perforcechecker.h +++ b/src/plugins/perforce/perforcechecker.h @@ -28,7 +28,6 @@ public: bool waitForFinished(); - bool useOverideCursor() const; void setUseOverideCursor(bool v); signals: diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index b1e0b6711a6..629df4fe831 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -255,7 +255,6 @@ public: const QByteArray &stdInput, QTextCodec *outputCodec) const; - QString clientFilePath(const QString &serverFilePath); void annotate(const FilePath &workingDir, const QString &fileName, const QString &changeList = QString(), int lineNumber = -1); void filelog(const FilePath &workingDir, const QString &fileName = QString(), @@ -1437,22 +1436,6 @@ bool PerforcePluginPrivate::activateCommit() return true; } -QString PerforcePluginPrivate::clientFilePath(const QString &serverFilePath) -{ - QTC_ASSERT(settings().isValid(), return QString()); - - QStringList args; - args << QLatin1String("fstat") << serverFilePath; - const PerforceResponse response = runP4Cmd(settings().topLevelSymLinkTarget(), args, - ShowBusyCursor|RunFullySynchronous|CommandToWindow|StdErrToWindow|ErrorToWindow); - if (response.error) - return {}; - - static const QRegularExpression r("\\.\\.\\.\\sclientFile\\s(.+?)\n"); - const QRegularExpressionMatch match = r.match(response.stdOut); - return match.hasMatch() ? match.captured(1).trimmed() : QString(); -} - QString PerforcePluginPrivate::pendingChangesData() { QTC_ASSERT(settings().isValid(), return QString()); diff --git a/src/plugins/perforce/perforcesettings.h b/src/plugins/perforce/perforcesettings.h index d1d8265157f..178aee2c3c2 100644 --- a/src/plugins/perforce/perforcesettings.h +++ b/src/plugins/perforce/perforcesettings.h @@ -42,7 +42,6 @@ public: QString *errorMessage); int longTimeOutS() const { return timeOutS() * 10; } - int timeOutMS() const { return timeOutS() * 1000; } Utils::FilePath topLevel() const; Utils::FilePath topLevelSymLinkTarget() const;