diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-05-26 05:31:02 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-05-26 05:31:02 -0400 |
| commit | 0439e18fe4cd2500c4ab6b3ff219c53153cf2175 (patch) | |
| tree | 9f7d3a29b137d65142662d466b92924046e3650d | |
| parent | c82c7af678c088a6b94fc8a4a0f31fc9498e8220 (diff) | |
changed enum case to follow convention
| -rw-r--r-- | src/mainwindow.cpp | 4 | ||||
| -rw-r--r-- | src/organizercore.cpp | 12 | ||||
| -rw-r--r-- | src/organizercore.h | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 94cbe9b1..b1728617 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -5163,7 +5163,7 @@ void MainWindow::addAsExecutable() switch (type) { - case FileExecutionTypes::executable: { + case FileExecutionTypes::Executable: { QString name = QInputDialog::getText(this, tr("Enter Name"), tr("Please enter a name for the executable"), QLineEdit::Normal, targetInfo.baseName()); @@ -5182,7 +5182,7 @@ void MainWindow::addAsExecutable() break; } - case FileExecutionTypes::other: // fall-through + case FileExecutionTypes::Other: // fall-through default: { QMessageBox::information(this, tr("Not an executable"), tr("This is not a recognized executable.")); break; diff --git a/src/organizercore.cpp b/src/organizercore.cpp index a10c23d7..04c94164 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -279,11 +279,11 @@ bool GetFileExecutionContext( (extension.compare("bat", Qt::CaseInsensitive) == 0)) { binaryInfo = QFileInfo("C:\\Windows\\System32\\cmd.exe"); arguments = QString("/C \"%1\"").arg(QDir::toNativeSeparators(targetInfo.absoluteFilePath())); - type = FileExecutionTypes::executable; + type = FileExecutionTypes::Executable; return true; } else if (extension.compare("exe", Qt::CaseInsensitive) == 0) { binaryInfo = targetInfo; - type = FileExecutionTypes::executable; + type = FileExecutionTypes::Executable; return true; } else if (extension.compare("jar", Qt::CaseInsensitive) == 0) { // types that need to be injected into @@ -323,10 +323,10 @@ bool GetFileExecutionContext( arguments = QString("\"%1\"").arg(QDir::toNativeSeparators(targetInfo.absoluteFilePath())); } - type = FileExecutionTypes::executable; + type = FileExecutionTypes::Executable; return true; } else { - type = FileExecutionTypes::other; + type = FileExecutionTypes::Other; return true; } } @@ -1461,7 +1461,7 @@ bool OrganizerCore::executeFileVirtualized( switch (type) { - case FileExecutionTypes::executable: { + case FileExecutionTypes::Executable: { spawnBinaryDirect( binaryInfo, arguments, currentProfile()->name(), targetInfo.absolutePath(), "", ""); @@ -1469,7 +1469,7 @@ bool OrganizerCore::executeFileVirtualized( return true; } - case FileExecutionTypes::other: { + case FileExecutionTypes::Other: { ::ShellExecuteW(nullptr, L"open", ToWString(targetInfo.absoluteFilePath()).c_str(), nullptr, nullptr, SW_SHOWNORMAL); diff --git a/src/organizercore.h b/src/organizercore.h index c9434e92..6f9defc2 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -59,8 +59,8 @@ namespace MOBase { enum class FileExecutionTypes
{
- executable = 1,
- other = 2
+ Executable = 1,
+ Other = 2
};
bool GetFileExecutionContext(
|
