浏览代码

Unused parameter

(it seems that it was never used)

Source commit: 7a61240971f9606d2156e588352db3f63d531e7f
Martin Prikryl 9 月之前
父节点
当前提交
ef4e1e87ab

+ 3 - 3
source/core/FtpFileSystem.cpp

@@ -492,7 +492,7 @@ void __fastcall TFTPFileSystem::Open()
 
       if (!PromptedForCredentials)
       {
-        FTerminal->Information(LoadStr(FTP_CREDENTIAL_PROMPT), false);
+        FTerminal->Information(LoadStr(FTP_CREDENTIAL_PROMPT));
         PromptedForCredentials = true;
       }
 
@@ -558,7 +558,7 @@ void __fastcall TFTPFileSystem::Open()
     {
       if (FPasswordFailed)
       {
-        FTerminal->Information(LoadStr(FTP_ACCESS_DENIED), false);
+        FTerminal->Information(LoadStr(FTP_ACCESS_DENIED));
       }
       else
       {
@@ -3736,7 +3736,7 @@ bool __fastcall TFTPFileSystem::HandleStatus(const wchar_t * AStatus, int Type)
   switch (Type)
   {
     case TFileZillaIntf::LOG_STATUS:
-      FTerminal->Information(Status, true);
+      FTerminal->Information(Status);
       LogType = llMessage;
       break;
 

+ 2 - 4
source/core/Queue.cpp

@@ -64,7 +64,7 @@ public:
   {
     if (OnInformation != NULL)
     {
-      OnInformation(Terminal, Str, Status, Phase, Additional);
+      OnInformation(Terminal, Str, Phase, Additional);
     }
   }
 
@@ -78,7 +78,6 @@ public:
   TInformationEvent OnInformation;
   TTerminal * Terminal;
   UnicodeString Str;
-  bool Status;
   int Phase;
   UnicodeString Additional;
 };
@@ -2895,12 +2894,11 @@ void __fastcall TTerminalThread::WaitForUserAction(TUserAction * UserAction)
 }
 //---------------------------------------------------------------------------
 void __fastcall TTerminalThread::TerminalInformation(
-  TTerminal * Terminal, const UnicodeString & Str, bool Status, int Phase, const UnicodeString & Additional)
+  TTerminal * Terminal, const UnicodeString & Str, int Phase, const UnicodeString & Additional)
 {
   TInformationUserAction Action(FOnInformation);
   Action.Terminal = Terminal;
   Action.Str = Str;
-  Action.Status = Status;
   Action.Phase = Phase;
   Action.Additional = Additional;
 

+ 1 - 1
source/core/Queue.h

@@ -469,7 +469,7 @@ private:
   void __fastcall TerminalReopenEvent(TObject * Sender);
 
   void __fastcall TerminalInformation(
-    TTerminal * Terminal, const UnicodeString & Str, bool Status, int Phase, const UnicodeString & Additional);
+    TTerminal * Terminal, const UnicodeString & Str, int Phase, const UnicodeString & Additional);
   void __fastcall TerminalQueryUser(TObject * Sender,
     const UnicodeString Query, TStrings * MoreMessages, unsigned int Answers,
     const TQueryParams * Params, unsigned int & Answer, TQueryType Type, void * Arg);

+ 1 - 1
source/core/S3FileSystem.cpp

@@ -443,7 +443,7 @@ void __fastcall TS3FileSystem::Open()
 
   RequireNeon(FTerminal);
 
-  FTerminal->Information(LoadStr(STATUS_CONNECT), true);
+  FTerminal->Information(LoadStr(STATUS_CONNECT));
 
   TSessionData * Data = FTerminal->SessionData;
 

+ 1 - 1
source/core/Script.cpp

@@ -2312,7 +2312,7 @@ bool __fastcall TManagementScript::QueryCancel()
 }
 //---------------------------------------------------------------------------
 void __fastcall TManagementScript::TerminalInformation(
-  TTerminal * ATerminal, const UnicodeString & Str, bool DebugUsedArg(Status), int Phase, const UnicodeString & DebugUsedArg(Additional))
+  TTerminal * ATerminal, const UnicodeString & Str, int Phase, const UnicodeString & DebugUsedArg(Additional))
 {
   DebugAssert(ATerminal != NULL);
   if ((Phase < 0) && (ATerminal->Status == ssOpening))

+ 1 - 1
source/core/Script.h

@@ -236,7 +236,7 @@ protected:
   virtual void __fastcall ResetTransfer();
   void __fastcall Input(const UnicodeString Prompt, UnicodeString & Str, bool AllowEmpty);
   void __fastcall TerminalInformation(
-    TTerminal * Terminal, const UnicodeString & Str, bool Status, int Phase, const UnicodeString & Additional);
+    TTerminal * Terminal, const UnicodeString & Str, int Phase, const UnicodeString & Additional);
   void __fastcall TerminalOperationProgress(TFileOperationProgressType & ProgressData);
   void __fastcall TerminalOperationFinished(TFileOperation Operation, TOperationSide Side,
     bool Temp, const UnicodeString & FileName, bool Success, bool NotCancelled,

+ 9 - 9
source/core/SecureShell.cpp

@@ -419,7 +419,7 @@ void __fastcall TSecureShell::Open()
 
   FAuthenticationLog = L"";
   FNoConnectionResponse = false;
-  FUI->Information(LoadStr(STATUS_LOOKUPHOST), true);
+  FUI->Information(LoadStr(STATUS_LOOKUPHOST));
 
   try
   {
@@ -450,7 +450,7 @@ void __fastcall TSecureShell::Open()
     {
       PuttyFatalError(InitError);
     }
-    FUI->Information(LoadStr(STATUS_CONNECT), true);
+    FUI->Information(LoadStr(STATUS_CONNECT));
     FAuthenticationCancelled = false;
     if (!Active && DebugAlwaysTrue(HasLocalProxy()))
     {
@@ -480,7 +480,7 @@ void __fastcall TSecureShell::Open()
 
   FAuthenticating = false;
   FAuthenticated = true;
-  FUI->Information(LoadStr(STATUS_AUTHENTICATED), true);
+  FUI->Information(LoadStr(STATUS_AUTHENTICATED));
 
   ResetSessionInfo();
 
@@ -910,7 +910,7 @@ bool __fastcall TSecureShell::PromptUser(bool /*ToServer*/,
         FLAGCLEAR(int(Prompts->Objects[0]), pupEcho))
     {
       LogEvent(L"Using stored password.");
-      FUI->Information(LoadStr(AUTH_PASSWORD), false);
+      FUI->Information(LoadStr(AUTH_PASSWORD));
       Result = true;
       Results->Strings[0] = NormalizeString(FSessionData->Password);
       FStoredPasswordTriedForKI = true;
@@ -926,7 +926,7 @@ bool __fastcall TSecureShell::PromptUser(bool /*ToServer*/,
     if (!FSessionData->Password.IsEmpty() && !FStoredPasswordTried)
     {
       LogEvent(L"Using stored password.");
-      FUI->Information(LoadStr(AUTH_PASSWORD), false);
+      FUI->Information(LoadStr(AUTH_PASSWORD));
       Result = true;
       Results->Strings[0] = NormalizeString(FSessionData->Password);
       FStoredPasswordTried = true;
@@ -946,7 +946,7 @@ bool __fastcall TSecureShell::PromptUser(bool /*ToServer*/,
   {
     if (FSessionData->ChangePassword)
     {
-      FUI->Information(LoadStr(AUTH_CHANGING_PASSWORD), false);
+      FUI->Information(LoadStr(AUTH_CHANGING_PASSWORD));
 
       if (!FSessionData->Password.IsEmpty() && !FSessionData->NewPassword.IsEmpty() && !FStoredPasswordTried)
       {
@@ -1002,7 +1002,7 @@ void __fastcall TSecureShell::GotHostKey()
     FAuthenticating = true;
     if (!FSessionData->ChangePassword)
     {
-      FUI->Information(LoadStr(STATUS_AUTHENTICATE), true);
+      FUI->Information(LoadStr(STATUS_AUTHENTICATE));
     }
   }
 }
@@ -1030,7 +1030,7 @@ void __fastcall TSecureShell::CWrite(const char * Data, size_t Length)
       FAuthenticationLog += (FAuthenticationLog.IsEmpty() ? L"" : L"\n") + Line;
     }
 
-    FUI->Information(Line, false);
+    FUI->Information(Line);
   }
 }
 //---------------------------------------------------------------------------
@@ -2560,7 +2560,7 @@ void __fastcall TSecureShell::VerifyHostKey(
         if (ExpectedKey == L"*")
         {
           UnicodeString Message = LoadStr(ANY_HOSTKEY);
-          FUI->Information(Message, true);
+          FUI->Information(Message);
           FLog->Add(llException, Message);
           Result = true;
         }

+ 1 - 1
source/core/SessionInfo.h

@@ -66,7 +66,7 @@ struct TFileSystemInfo
 class TSessionUI
 {
 public:
-  virtual void __fastcall Information(const UnicodeString & Str, bool Status) = 0;
+  virtual void __fastcall Information(const UnicodeString & Str) = 0;
   virtual unsigned int __fastcall QueryUser(const UnicodeString Query,
     TStrings * MoreMessages, unsigned int Answers, const TQueryParams * Params,
     TQueryType QueryType = qtConfirmation) = 0;

+ 17 - 17
source/core/Terminal.cpp

@@ -201,7 +201,7 @@ class TTunnelUI : public TSessionUI
 {
 public:
   __fastcall TTunnelUI(TTerminal * Terminal);
-  virtual void __fastcall Information(const UnicodeString & Str, bool Status);
+  virtual void __fastcall Information(const UnicodeString & Str);
   virtual unsigned int __fastcall QueryUser(const UnicodeString Query,
     TStrings * MoreMessages, unsigned int Answers, const TQueryParams * Params,
     TQueryType QueryType);
@@ -228,11 +228,11 @@ __fastcall TTunnelUI::TTunnelUI(TTerminal * Terminal)
   FTerminalThread = GetCurrentThreadId();
 }
 //---------------------------------------------------------------------------
-void __fastcall TTunnelUI::Information(const UnicodeString & Str, bool Status)
+void __fastcall TTunnelUI::Information(const UnicodeString & Str)
 {
   if (GetCurrentThreadId() == FTerminalThread)
   {
-    FTerminal->Information(Str, Status);
+    FTerminal->Information(Str);
   }
 }
 //---------------------------------------------------------------------------
@@ -1470,7 +1470,7 @@ void __fastcall TTerminal::Open()
       ValidateEncryptKey(FEncryptKey);
     }
 
-    DoInformation(L"", true, 1);
+    DoInformation(L"", 1);
     try
     {
       FRememberedPasswordUsed = false;
@@ -1491,14 +1491,14 @@ void __fastcall TTerminal::Open()
           DebugAssert(FTunnel == NULL);
           if (FSessionData->Tunnel)
           {
-            DoInformation(LoadStr(OPEN_TUNNEL), true);
+            Information(LoadStr(OPEN_TUNNEL));
             LogEvent(L"Opening tunnel.");
             OpenTunnel();
             Log->AddSeparator();
 
             FSessionData->ConfigureTunnel(FTunnelLocalPortNumber);
 
-            DoInformation(LoadStr(USING_TUNNEL), false);
+            Information(LoadStr(USING_TUNNEL));
             LogEvent(FORMAT(L"Connecting via tunnel interface %s:%d.",
               (FSessionData->HostNameExpanded, FSessionData->PortNumber)));
           }
@@ -1625,7 +1625,7 @@ void __fastcall TTerminal::Open()
           FCollectFileSystemUsage = false;
         }
 
-        DoInformation(LoadStr(STATUS_READY), true);
+        Information(LoadStr(STATUS_READY));
         FStatus = ssOpened;
       }
       catch(...)
@@ -1659,7 +1659,7 @@ void __fastcall TTerminal::Open()
     {
       // This does not make it through, if terminal thread is abandoned,
       // see also TTerminalManager::DoConnectTerminal
-      DoInformation(L"", true, 0);
+      DoInformation(L"", 0);
     }
   }
   catch(EFatal &)
@@ -2163,14 +2163,14 @@ void __fastcall TTerminal::ShowExtendedException(Exception * E)
 }
 //---------------------------------------------------------------------------
 void __fastcall TTerminal::DoInformation(
-  const UnicodeString & Str, bool Status, int Phase, const UnicodeString & Additional)
+  const UnicodeString & Str, int Phase, const UnicodeString & Additional)
 {
   if (OnInformation)
   {
     TCallbackGuard Guard(this);
     try
     {
-      OnInformation(this, Str, Status, Phase, Additional);
+      OnInformation(this, Str, Phase, Additional);
       Guard.Verify();
     }
     catch (Exception & E)
@@ -2183,9 +2183,9 @@ void __fastcall TTerminal::DoInformation(
   }
 }
 //---------------------------------------------------------------------------
-void __fastcall TTerminal::Information(const UnicodeString & Str, bool Status)
+void __fastcall TTerminal::Information(const UnicodeString & Str)
 {
-  DoInformation(Str, Status);
+  DoInformation(Str);
 }
 //---------------------------------------------------------------------------
 void __fastcall TTerminal::DoProgress(TFileOperationProgressType & ProgressData)
@@ -2866,7 +2866,7 @@ void __fastcall TTerminal::DoEndTransaction(bool Inform)
         {
           if (Inform)
           {
-            DoInformation(LoadStr(STATUS_OPEN_DIRECTORY), true, -1, CurrentDirectory);
+            DoInformation(LoadStr(STATUS_OPEN_DIRECTORY), -1, CurrentDirectory);
           }
           ReadDirectory(!FReadCurrentDirectoryPending);
         }
@@ -3439,7 +3439,7 @@ void __fastcall TTerminal::DoStartup()
   BeginTransaction();
   try
   {
-    DoInformation(LoadStr(STATUS_STARTUP), true);
+    Information(LoadStr(STATUS_STARTUP));
 
     // Make sure that directory would be loaded at last
     FReadCurrentDirectoryPending = true;
@@ -8544,7 +8544,7 @@ bool  __fastcall TTerminal::VerifyCertificate(
       if (ExpectedKey == L"*")
       {
         UnicodeString Message = LoadStr(ANY_CERTIFICATE);
-        Information(Message, true);
+        Information(Message);
         Log->Add(llException, Message);
         Result = true;
       }
@@ -8741,11 +8741,11 @@ bool __fastcall TTerminal::LoadTlsCertificate(X509 *& Certificate, EVP_PKEY *& P
         if (Passphrase.IsEmpty())
         {
           LogEvent(L"Certificate is encrypted, need passphrase");
-          Information(LoadStr(CLIENT_CERTIFICATE_LOADING), false);
+          Information(LoadStr(CLIENT_CERTIFICATE_LOADING));
         }
         else
         {
-          Information(LoadStr(CERTIFICATE_DECODE_ERROR_INFO), false);
+          Information(LoadStr(CERTIFICATE_DECODE_ERROR_INFO));
         }
 
         Passphrase = L"";

+ 3 - 3
source/core/Terminal.h

@@ -66,7 +66,7 @@ typedef void __fastcall (__closure *TDeleteLocalFileEvent)(
 typedef int __fastcall (__closure *TDirectoryModifiedEvent)
   (TTerminal * Terminal, const UnicodeString Directory, bool SubDirs);
 typedef void __fastcall (__closure *TInformationEvent)
-  (TTerminal * Terminal, const UnicodeString & Str, bool Status, int Phase, const UnicodeString & Additional);
+  (TTerminal * Terminal, const UnicodeString & Str, int Phase, const UnicodeString & Additional);
 typedef void __fastcall (__closure *TCustomCommandEvent)
   (TTerminal * Terminal, const UnicodeString & Command, bool & Handled);
 //---------------------------------------------------------------------------
@@ -386,7 +386,7 @@ protected:
   void __fastcall OpenTunnel();
   void __fastcall CloseTunnel();
   void __fastcall DoInformation(
-    const UnicodeString & Str, bool Status, int Phase = -1, const UnicodeString & Additional = UnicodeString());
+    const UnicodeString & Str, int Phase = -1, const UnicodeString & Additional = UnicodeString());
   bool __fastcall PromptUser(TSessionData * Data, TPromptKind Kind,
     UnicodeString Name, UnicodeString Instructions, UnicodeString Prompt, bool Echo,
     int MaxLen, UnicodeString & Result);
@@ -408,7 +408,7 @@ protected:
     TFileOperationProgressType & Progress, TFileOperation Operation, TOperationSide Side, int Count,
     bool Temp, const UnicodeString & Directory, unsigned long CPSLimit, TOnceDoneOperation OnceDoneOperation);
   void __fastcall OperationStop(TFileOperationProgressType & Progress);
-  virtual void __fastcall Information(const UnicodeString & Str, bool Status);
+  virtual void __fastcall Information(const UnicodeString & Str);
   virtual unsigned int __fastcall QueryUser(const UnicodeString Query,
     TStrings * MoreMessages, unsigned int Answers, const TQueryParams * Params,
     TQueryType QueryType = qtConfirmation);

+ 2 - 2
source/core/WebDAVFileSystem.cpp

@@ -219,7 +219,7 @@ void __fastcall TWebDAVFileSystem::Open()
   UnicodeString EscapedPath = StrFromNeon(PathEscape(StrToNeon(Path)).c_str());
   UnicodeString Url = FORMAT(L"%s://%s:%d%s", (ProtocolName, HostName, Port, EscapedPath));
 
-  FTerminal->Information(LoadStr(STATUS_CONNECT), true);
+  FTerminal->Information(LoadStr(STATUS_CONNECT));
   FActive = false;
   try
   {
@@ -1715,7 +1715,7 @@ int TWebDAVFileSystem::NeonBodyAccepter(void * UserData, ne_request * Request, c
 
     if (!Line.IsEmpty())
     {
-      FileSystem->FTerminal->Information(Line, true);
+      FileSystem->FTerminal->Information(Line);
     }
 
     UnicodeString RemoteSystem;

+ 1 - 1
source/windows/TerminalManager.cpp

@@ -1465,7 +1465,7 @@ void __fastcall TTerminalManager::AuthenticatingDone()
 }
 //---------------------------------------------------------------------------
 void __fastcall TTerminalManager::TerminalInformation(
-  TTerminal * Terminal, const UnicodeString & Str, bool DebugUsedArg(Status), int Phase, const UnicodeString & Additional)
+  TTerminal * Terminal, const UnicodeString & Str, int Phase, const UnicodeString & Additional)
 {
   if (ScpExplorer != NULL)
   {

+ 1 - 1
source/windows/TerminalManager.h

@@ -197,7 +197,7 @@ private:
   void __fastcall TerminalReadDirectoryProgress(TObject * Sender, int Progress,
     int ResolvedLinks, bool & Cancel);
   void __fastcall TerminalInformation(
-    TTerminal * Terminal, const UnicodeString & Str, bool Status, int Phase, const UnicodeString & Additional);
+    TTerminal * Terminal, const UnicodeString & Str, int Phase, const UnicodeString & Additional);
   void __fastcall TerminalCustomCommand(TTerminal * Terminal, const UnicodeString & Command, bool & Handled);
   void __fastcall FreeAll();
   void __fastcall SessionReady();