summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Tanner <trtanner@btinternet.com>2016-01-24 15:25:38 +0000
committerThomas Tanner <trtanner@btinternet.com>2016-01-24 15:25:38 +0000
commit8da9ba5404f51521b3425b6213e8139189dbca69 (patch)
tree790307574808607d20a1c1d16b78c155caebd4f3 /src
parent387326f2d62fe02babe3594e2e00f831355da9b7 (diff)
parent5adb3b377ecd50a75dd034a49582a1da91b67e1c (diff)
Removing the 'get' in all function names and making FO4 plugin build
Merge branch 'master' of https://github.com/TanninOne/modorganizer
Diffstat (limited to 'src')
-rw-r--r--src/downloadmanager.cpp4
-rw-r--r--src/mainwindow.cpp12
-rw-r--r--src/modinfo.cpp6
-rw-r--r--src/nexusinterface.cpp12
-rw-r--r--src/organizercore.cpp8
-rw-r--r--src/pluginlist.cpp6
-rw-r--r--src/profile.cpp2
-rw-r--r--src/selfupdater.cpp8
-rw-r--r--src/settings.cpp2
9 files changed, 30 insertions, 30 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index c551e590..e327e55a 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -450,7 +450,7 @@ void DownloadManager::addNXMDownload(const QString &url)
{
NXMUrl nxmInfo(url);
- QString managedGame = m_ManagedGame->getGameShortName();
+ QString managedGame = m_ManagedGame->gameShortName();
qDebug("add nxm download: %s", qPrintable(url));
if (nxmInfo.game().compare(managedGame, Qt::CaseInsensitive) != 0) {
qDebug("download requested for wrong game (game: %s, url: %s)", qPrintable(managedGame), qPrintable(nxmInfo.game()));
@@ -1247,7 +1247,7 @@ int DownloadManager::startDownloadURLs(const QStringList &urls)
int DownloadManager::startDownloadNexusFile(int modID, int fileID)
{
int newID = m_ActiveDownloads.size();
- addNXMDownload(QString("nxm://%1/mods/%2/files/%3").arg(m_ManagedGame->getGameShortName()).arg(modID).arg(fileID));
+ addNXMDownload(QString("nxm://%1/mods/%2/files/%3").arg(m_ManagedGame->gameShortName()).arg(modID).arg(fileID));
return newID;
}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index f30e46f1..da103985 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1269,7 +1269,7 @@ QDir MainWindow::currentSavesDir() const
L"General", L"SLocalSavePath", L"Saves",
path, MAX_PATH,
ToWString(m_OrganizerCore.currentProfile()->absolutePath() + "/" +
- m_OrganizerCore.managedGame()->getIniFiles()[0]).c_str());
+ m_OrganizerCore.managedGame()->iniFiles()[0]).c_str());
savesDir.setPath(m_OrganizerCore.managedGame()->documentsDirectory().absoluteFilePath(QString::fromWCharArray(path)));
}
@@ -3846,7 +3846,7 @@ void MainWindow::on_actionEndorseMO_triggered()
NexusInterface::instance()->getGameURL()),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
NexusInterface::instance()->requestToggleEndorsement(
- m_OrganizerCore.managedGame()->getNexusModOrganizerID(), true, this, QVariant(), QString());
+ m_OrganizerCore.managedGame()->nexusModOrganizerID(), true, this, QVariant(), QString());
}
}
@@ -3910,7 +3910,7 @@ void MainWindow::nxmUpdatesAvailable(const std::vector<int> &modIDs, QVariant us
QVariantList resultList = resultData.toList();
for (auto iter = resultList.begin(); iter != resultList.end(); ++iter) {
QVariantMap result = iter->toMap();
- if (result["id"].toInt() == m_OrganizerCore.managedGame()->getNexusModOrganizerID()) {
+ if (result["id"].toInt() == m_OrganizerCore.managedGame()->nexusModOrganizerID()) {
if (!result["voted_by_user"].toBool()) {
ui->actionEndorseMO->setVisible(true);
}
@@ -4426,7 +4426,7 @@ void MainWindow::on_bossButton_clicked()
parameters << "--unattended"
<< "--stdout"
<< "--noreport"
- << "--game" << m_OrganizerCore.managedGame()->getGameShortName()
+ << "--game" << m_OrganizerCore.managedGame()->gameShortName()
<< "--gamePath" << QString("\"%1\"").arg(m_OrganizerCore.managedGame()->gameDirectory().absolutePath())
<< "--out" << outPath;
@@ -4560,12 +4560,12 @@ void MainWindow::on_bossButton_clicked()
// if the game specifies load order by file time, our own load order file needs to be removed because it's outdated.
// refreshESPList will then use the file time as the load order.
- if (m_OrganizerCore.managedGame()->getLoadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) {
+ if (m_OrganizerCore.managedGame()->loadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) {
qDebug("removing loadorder.txt");
QFile::remove(m_OrganizerCore.currentProfile()->getLoadOrderFileName());
}
m_OrganizerCore.refreshESPList();
- if (m_OrganizerCore.managedGame()->getLoadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) {
+ if (m_OrganizerCore.managedGame()->loadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) {
// the load order should have been retrieved from file time, now save it to our own format
m_OrganizerCore.savePluginList();
}
diff --git a/src/modinfo.cpp b/src/modinfo.cpp
index 8bc767c5..1081daf8 100644
--- a/src/modinfo.cpp
+++ b/src/modinfo.cpp
@@ -220,8 +220,8 @@ void ModInfo::updateFromDisc(const QString &modDirectory,
}
{ // list plugins in the data directory and make a foreign-managed mod out of each
- QStringList dlcPlugins = game->getDLCPlugins();
- QStringList mainPlugins = game->getPrimaryPlugins();
+ QStringList dlcPlugins = game->DLCPlugins();
+ QStringList mainPlugins = game->primaryPlugins();
QDir dataDir(game->dataDirectory());
for (const QString &file : dataDir.entryList({ "*.esp", "*.esm" })) {
if (std::find_if(mainPlugins.begin(), mainPlugins.end(),
@@ -291,7 +291,7 @@ int ModInfo::checkAllForUpdate(QObject *receiver)
//I ought to store this, it's used elsewhere
IPluginGame const *game = qApp->property("managed_game").value<IPluginGame const *>();
- modIDs.push_back(game->getNexusModOrganizerID());
+ modIDs.push_back(game->nexusModOrganizerID());
for (const ModInfo::Ptr &mod : s_Collection) {
if (mod->canBeUpdated()) {
diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp
index 26a74ef6..d0eb58a6 100644
--- a/src/nexusinterface.cpp
+++ b/src/nexusinterface.cpp
@@ -250,12 +250,12 @@ bool NexusInterface::isURLGameRelated(const QUrl &url) const
QString NexusInterface::getGameURL() const
{
- return "http://www.nexusmods.com/" + m_Game->getGameShortName().toLower();
+ return "http://www.nexusmods.com/" + m_Game->gameShortName().toLower();
}
QString NexusInterface::getOldModsURL() const
{
- return "http://" + m_Game->getGameShortName().toLower() + ".nexusmods.com/mods";
+ return "http://" + m_Game->gameShortName().toLower() + ".nexusmods.com/mods";
}
@@ -593,7 +593,7 @@ void NexusInterface::managedGameChanged(IPluginGame const *game)
namespace {
QString get_management_url(MOBase::IPluginGame const *game)
{
- return "http://nmm.nexusmods.com/" + game->getGameShortName().toLower();
+ return "http://nmm.nexusmods.com/" + game->gameShortName().toLower();
}
}
@@ -613,7 +613,7 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID
, m_ID(s_NextID.fetchAndAddAcquire(1))
, m_URL(get_management_url(game))
, m_SubModule(subModule)
- , m_NexusGameID(game->getNexusGameID())
+ , m_NexusGameID(game->nexusGameID())
, m_Endorse(false)
{}
@@ -634,7 +634,7 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(std::vector<int> modIDList
, m_ID(s_NextID.fetchAndAddAcquire(1))
, m_URL(get_management_url(game))
, m_SubModule(subModule)
- , m_NexusGameID(game->getNexusGameID())
+ , m_NexusGameID(game->nexusGameID())
, m_Endorse(false)
{}
@@ -655,6 +655,6 @@ NexusInterface::NXMRequestInfo::NXMRequestInfo(int modID
, m_ID(s_NextID.fetchAndAddAcquire(1))
, m_URL(get_management_url(game))
, m_SubModule(subModule)
- , m_NexusGameID(game->getNexusGameID())
+ , m_NexusGameID(game->nexusGameID())
, m_Endorse(false)
{}
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 06a6dba4..2b50b163 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -401,8 +401,8 @@ void OrganizerCore::connectPlugins(PluginContainer *container)
}
//Do this the hard way
for (const IPluginGame * const game : container->plugins<IPluginGame>()) {
- QString n = game->getGameShortName();
- if (game->getGameShortName() == "Skyrim") {
+ QString n = game->gameShortName();
+ if (game->gameShortName() == "Skyrim") {
m_Updater.setNexusDownload(game);
break;
}
@@ -932,12 +932,12 @@ void OrganizerCore::spawnBinary(const QFileInfo &binary, const QString &argument
refreshDirectoryStructure();
// need to remove our stored load order because it may be outdated if a foreign tool changed the
// file time. After removing that file, refreshESPList will use the file time as the order
- if (managedGame()->getLoadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) {
+ if (managedGame()->loadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) {
qDebug("removing loadorder.txt");
QFile::remove(m_CurrentProfile->getLoadOrderFileName());
}
refreshESPList();
- if (managedGame()->getLoadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) {
+ if (managedGame()->loadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) {
// the load order should have been retrieved from file time, now save it to our own format
savePluginList();
}
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp
index 7a609374..bf5a09dc 100644
--- a/src/pluginlist.cpp
+++ b/src/pluginlist.cpp
@@ -127,7 +127,7 @@ void PluginList::refresh(const QString &profileName
m_ESPsByPriority.clear();
m_ESPs.clear();
- QStringList primaryPlugins = m_GamePlugin->getPrimaryPlugins();
+ QStringList primaryPlugins = m_GamePlugin->primaryPlugins();
m_CurrentProfile = profileName;
@@ -312,7 +312,7 @@ bool PluginList::readLoadOrder(const QString &fileName)
int priority = 0;
- QStringList primaryPlugins = m_GamePlugin->getPrimaryPlugins();
+ QStringList primaryPlugins = m_GamePlugin->primaryPlugins();
for (const QString &plugin : primaryPlugins) {
if (availableESPs.find(plugin) != availableESPs.end()) {
m_ESPLoadOrder[plugin] = priority++;
@@ -503,7 +503,7 @@ void PluginList::saveTo(const QString &pluginFileName
bool PluginList::saveLoadOrder(DirectoryEntry &directoryStructure)
{
- if (m_GamePlugin->getLoadOrderMechanism() != IPluginGame::LoadOrderMechanism::FileTime) {
+ if (m_GamePlugin->loadOrderMechanism() != IPluginGame::LoadOrderMechanism::FileTime) {
// nothing to do
return true;
}
diff --git a/src/profile.cpp b/src/profile.cpp
index 77f6ebd1..e1243971 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -674,7 +674,7 @@ QString Profile::getDeleterFileName() const
QString Profile::getIniFileName() const
{
- return m_Directory.absoluteFilePath(m_GamePlugin->getIniFiles()[0]);
+ return m_Directory.absoluteFilePath(m_GamePlugin->iniFiles()[0]);
}
QString Profile::getProfileTweaks() const
diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp
index e402d03c..bc8908bc 100644
--- a/src/selfupdater.cpp
+++ b/src/selfupdater.cpp
@@ -126,7 +126,7 @@ void SelfUpdater::testForUpdate()
}
if (m_UpdateRequestID == -1 && m_NexusDownload != nullptr) {
m_UpdateRequestID = m_Interface->requestDescription(
- m_NexusDownload->getNexusModOrganizerID(), this, QVariant(),
+ m_NexusDownload->nexusModOrganizerID(), this, QVariant(),
QString(), m_NexusDownload);
}
}
@@ -144,7 +144,7 @@ void SelfUpdater::startUpdate()
if (QMessageBox::question(m_Parent, tr("Update"),
tr("An update is available (newest version: %1), do you want to install it?").arg(m_NewestVersion),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
- m_UpdateRequestID = m_Interface->requestFiles(m_NexusDownload->getNexusModOrganizerID(),
+ m_UpdateRequestID = m_Interface->requestFiles(m_NexusDownload->nexusModOrganizerID(),
this, m_NewestVersion, "",
m_NexusDownload);
}
@@ -438,7 +438,7 @@ void SelfUpdater::nxmFilesAvailable(int, QVariant userData, QVariant resultData,
if (updateFileID != -1) {
qDebug("update available: %d", updateFileID);
- m_UpdateRequestID = m_Interface->requestDownloadURL(m_NexusDownload->getNexusModOrganizerID(),
+ m_UpdateRequestID = m_Interface->requestDownloadURL(m_NexusDownload->nexusModOrganizerID(),
updateFileID, this, updateFileName, "",
m_NexusDownload);
} else if (mainFileID != -1) {
@@ -447,7 +447,7 @@ void SelfUpdater::nxmFilesAvailable(int, QVariant userData, QVariant resultData,
tr("No incremental update available for this version, "
"the complete package needs to be downloaded (%1 kB)").arg(mainFileSize),
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) {
- m_UpdateRequestID = m_Interface->requestDownloadURL(m_NexusDownload->getNexusModOrganizerID(),
+ m_UpdateRequestID = m_Interface->requestDownloadURL(m_NexusDownload->nexusModOrganizerID(),
mainFileID, this, mainFileName, "",
m_NexusDownload);
}
diff --git a/src/settings.cpp b/src/settings.cpp
index d493be1d..7b812759 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -107,7 +107,7 @@ void Settings::registerAsNXMHandler(bool force)
std::wstring nxmPath = ToWString(QCoreApplication::applicationDirPath() + "/nxmhandler.exe");
std::wstring executable = ToWString(QCoreApplication::applicationFilePath());
std::wstring mode = force ? L"forcereg" : L"reg";
- std::wstring parameters = mode + L" " + m_GamePlugin->getGameShortName().toStdWString() + L" \"" + executable + L"\"";
+ std::wstring parameters = mode + L" " + m_GamePlugin->gameShortName().toStdWString() + L" \"" + executable + L"\"";
HINSTANCE res = ::ShellExecuteW(nullptr, L"open", nxmPath.c_str(), parameters.c_str(), nullptr, SW_SHOWNORMAL);
if ((int)res <= 32) {
QMessageBox::critical(nullptr, tr("Failed"),