Apply suggestions from code review
Co-authored-by: seth <getchoo@tuta.io> Signed-off-by: Alexandru Ionut Tripon <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
973b43ca7a
commit
d20f24d96f
@ -777,8 +777,8 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
|
||||
// FTBApp instances
|
||||
m_settings->registerSetting("FTBAppInstancesPath", "");
|
||||
|
||||
// Custom Techinc Client ID
|
||||
m_settings->registerSetting("TechincClientID", "");
|
||||
// Custom Technic Client ID
|
||||
m_settings->registerSetting("TechnicClientID", "");
|
||||
|
||||
// Init page provider
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ void APIPage::loadSettings()
|
||||
ui->modrinthToken->setText(modrinthToken);
|
||||
QString customUserAgent = s->get("UserAgentOverride").toString();
|
||||
ui->userAgentLineEdit->setText(customUserAgent);
|
||||
ui->techicClientID->setText(s->get("TechincClientID").toString());
|
||||
ui->techicClientID->setText(s->get("TechnicClientID").toString());
|
||||
}
|
||||
|
||||
void APIPage::applySettings()
|
||||
@ -173,7 +173,7 @@ void APIPage::applySettings()
|
||||
QString modrinthToken = ui->modrinthToken->text();
|
||||
s->set("ModrinthToken", modrinthToken);
|
||||
s->set("UserAgentOverride", ui->userAgentLineEdit->text());
|
||||
s->set("TechincClientID", ui->techicClientID->text());
|
||||
s->set("TechincClientID", ui->technicClientID->text());
|
||||
}
|
||||
|
||||
bool APIPage::apply()
|
||||
|
@ -291,7 +291,7 @@
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Techinc Client ID</string>
|
||||
<string>Technic Client ID</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<item>
|
||||
@ -302,7 +302,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="techicClientID">
|
||||
<widget class="QLineEdit" name="technicClientID">
|
||||
<property name="placeholderText">
|
||||
<string>(None)</string>
|
||||
</property>
|
||||
@ -311,7 +311,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Enter a custom GUID client ID for Techinc here.</string>
|
||||
<string>Enter a custom GUID client ID for Technic here.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -154,7 +154,7 @@ void Technic::ListModel::performSearch()
|
||||
QString("%1search?build=%2&q=%3").arg(BuildConfig.TECHNIC_API_BASE_URL, BuildConfig.TECHNIC_API_BUILD, currentSearchTerm);
|
||||
searchMode = List;
|
||||
}
|
||||
auto clientId = APPLICATION->settings()->get("TechincClientID").toString();
|
||||
auto clientId = APPLICATION->settings()->get("TechnicClientID").toString();
|
||||
if (!clientId.isEmpty()) {
|
||||
searchUrl += "?cid=" + clientId;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user