diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-11-24 18:17:15 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-11-25 08:55:44 +0000 |
commit | 6dc1a1e98f02ec057a4d5673e8daa165e5eafa92 (patch) | |
tree | a4437092f18690fbad82cc2cd7f0fdbaa7bd33b5 | |
parent | b34fc8a4209747ef00a3e30a447aefc01b9af2af (diff) | |
download | qt-creator-6dc1a1e98f02ec057a4d5673e8daa165e5eafa92.tar.gz |
LinuxDeviceTester: Avoid non-trivial global variables
Change-Id: I1c3cf646ecbd6619f7c5a6eb117a0aca43d78534
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
-rw-r--r-- | src/plugins/remotelinux/linuxdevicetester.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/plugins/remotelinux/linuxdevicetester.cpp b/src/plugins/remotelinux/linuxdevicetester.cpp index 9005db8322..d3826cca39 100644 --- a/src/plugins/remotelinux/linuxdevicetester.cpp +++ b/src/plugins/remotelinux/linuxdevicetester.cpp @@ -49,42 +49,42 @@ public: QList<TaskItem> m_extraTests; }; -const QStringList s_commandsToTest = {"base64", - "cat", - "chmod", - "cp", - "cut", - "dd", - "df", - "echo", - "eval", - "exit", - "kill", - "ls", - "mkdir", - "mkfifo", - "mktemp", - "mv", - "printf", - "read", - "readlink", - "rm", - "sed", - "sh", - "shift", - "stat", - "tail", - "test", - "trap", - "touch", - "which"}; -// other possible commands (checked for qnx): -// "awk", "grep", "netstat", "print", "pidin", "sleep", "uname" - static const char s_echoContents[] = "Hello Remote World!"; QStringList GenericLinuxDeviceTesterPrivate::commandsToTest() const { + static const QStringList s_commandsToTest = {"base64", + "cat", + "chmod", + "cp", + "cut", + "dd", + "df", + "echo", + "eval", + "exit", + "kill", + "ls", + "mkdir", + "mkfifo", + "mktemp", + "mv", + "printf", + "read", + "readlink", + "rm", + "sed", + "sh", + "shift", + "stat", + "tail", + "test", + "trap", + "touch", + "which"}; + // other possible commands (checked for qnx): + // "awk", "grep", "netstat", "print", "pidin", "sleep", "uname" + QStringList commands = s_commandsToTest + m_extraCommands; commands.removeDuplicates(); Utils::sort(commands); |