From 0439e18fe4cd2500c4ab6b3ff219c53153cf2175 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Sun, 26 May 2019 05:31:02 -0400 Subject: changed enum case to follow convention --- src/mainwindow.cpp | 4 ++-- src/organizercore.cpp | 12 ++++++------ src/organizercore.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src') 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( -- cgit v1.3.1