summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-08-01 11:03:09 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2020-08-01 11:03:09 -0400
commit64ba6cae1e6b74929d88de628bb2915cb9c6f2d2 (patch)
tree1aa52dcd3beda7d2fdc3eb54756e8fc1ebadb03a /src
parentf71accc1ad4bf2b1de91dfa0c3921fbf6c829191 (diff)
revert font scaling:
- users report low quality splash screen - sticking with qt's default is better in the long run - can still use the environment variable revert network timer: - users report error in log every second - was a blind fix anyway, can't reliably reproduce it
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp13
-rw-r--r--src/nxmaccessmanager.cpp42
-rw-r--r--src/nxmaccessmanager.h2
3 files changed, 4 insertions, 53 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 08889018..f008896b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -905,20 +905,9 @@ int main(int argc, char *argv[])
if (!tempDir.exists())
tempDir.root().mkpath(tempDir.canonicalPath());
-
- // qt 5.14 changed how fraction font scaling works; by default 125% is
- // rounded to 100% and 150% is rounded to 200%, which doesn't make any sense
- //
- // force qt to use the exact scaling value by change the policy to
- // PassThrough
- //
- QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
- Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
-
- // MO is somewhat high dpi aware
+ //Should allow for better scaling of ui with higher resolution displays
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
-
if (argc >= 4) {
std::vector<std::wstring> arg;
auto args = UntouchedCommandLineArguments(2, arg);
diff --git a/src/nxmaccessmanager.cpp b/src/nxmaccessmanager.cpp
index 9fe00f88..2fe676ba 100644
--- a/src/nxmaccessmanager.cpp
+++ b/src/nxmaccessmanager.cpp
@@ -772,46 +772,10 @@ NXMAccessManager::NXMAccessManager(QObject *parent, const QString &moVersion)
setCookieJar(new PersistentCookieJar(QDir::fromNativeSeparators(
Settings::instance().paths().cache() + "/nexus_cookies.dat")));
- networkAccessibleFix();
-}
-
-void NXMAccessManager::networkAccessibleFix()
-{
- // Qt 5.14 seems to have introduced a regression with network accessibility
- // where some users say MO can't access the network at all
- //
- // some users use a vpn, one other had a dns resolver
- //
- // it looks like networkAccessible() is sometimes set to NotAccessible,
- // which prevents all network requests from even reaching the OS
- //
- // there are some events that seem like they should be fired, like
- // QNetworkAccessManager::networkAccessibleChanged, but they're not
- //
- // the only solution that seems to kinda work is just to start a timer,
- // check when networkAccessible() is changed to NotAccessible and revert it
- // to UnknownAccessibility
- //
- // see also:
- // https://github.com/ModOrganizer2/modorganizer/issues/1173
- // https://bugreports.qt.io/browse/QTBUG-55180
-
- // check first
- if (networkAccessible() == QNetworkAccessManager::NotAccessible) {
- log::debug("network is not accessible, forcing to unknown");
- setNetworkAccessible(QNetworkAccessManager::UnknownAccessibility);
+ if (networkAccessible() == QNetworkAccessManager::UnknownAccessibility) {
+ // why is this necessary all of a sudden?
+ setNetworkAccessible(QNetworkAccessManager::Accessible);
}
-
- auto* t = new QTimer(this);
-
- connect(t, &QTimer::timeout, [&]{
- if (networkAccessible() == QNetworkAccessManager::NotAccessible) {
- log::debug("network is not accessible, forcing to unknown");
- setNetworkAccessible(QNetworkAccessManager::UnknownAccessibility);
- }
- });
-
- t->start(std::chrono::seconds(1));
}
void NXMAccessManager::setTopLevelWidget(QWidget* w)
diff --git a/src/nxmaccessmanager.h b/src/nxmaccessmanager.h
index f200f595..6a45d880 100644
--- a/src/nxmaccessmanager.h
+++ b/src/nxmaccessmanager.h
@@ -269,8 +269,6 @@ private:
NexusKeyValidator m_validator;
States m_validationState;
- void networkAccessibleFix();
-
void startValidationCheck(const QString& key);
void onValidatorFinished(