From c05be9f5c3dc1b97d540cf9de7d99d0c0d692db7 Mon Sep 17 00:00:00 2001 From: Tannin Date: Tue, 26 May 2015 20:42:15 +0200 Subject: small stuff --- src/aboutdialog.ui | 12 +- src/logbuffer.cpp | 2 +- src/main.cpp | 7 +- src/mainwindow.cpp | 5 +- src/moapplication.cpp | 1 - src/modlist.cpp | 1 + src/pluginlist.cpp | 1 - src/savegameinfowidget.cpp | 4 +- src/savegameinfowidget.ui | 415 -------------------------------------------- src/settings.cpp | 12 +- src/stylesheets/dracula.qss | 3 +- src/version.rc | 4 +- 12 files changed, 33 insertions(+), 434 deletions(-) (limited to 'src') diff --git a/src/aboutdialog.ui b/src/aboutdialog.ui index 8a8fe957..7512645c 100644 --- a/src/aboutdialog.ui +++ b/src/aboutdialog.ui @@ -46,7 +46,7 @@ - 0 + 2 @@ -183,6 +183,11 @@ Ren (Korean) + + + ... more (Can't track) + + @@ -249,6 +254,11 @@ z929669 + + + thosrtanner + + diff --git a/src/logbuffer.cpp b/src/logbuffer.cpp index 0ddd927b..a07ae264 100644 --- a/src/logbuffer.cpp +++ b/src/logbuffer.cpp @@ -129,7 +129,7 @@ char LogBuffer::msgTypeID(QtMsgType type) void LogBuffer::log(QtMsgType type, const QMessageLogContext &context, const QString &message) { // QMutexLocker doesn't support timeout... - if (!s_Mutex.tryLock(50)) { + if (!s_Mutex.tryLock(100)) { fprintf(stderr, "failed to log: %s", qPrintable(message)); return; } diff --git a/src/main.cpp b/src/main.cpp index cbf561ed..ac0582bf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -516,7 +516,8 @@ int main(int argc, char *argv[]) // if we have a command line parameter, it is either a nxm link or // a binary to start - if ((arguments.size() > 1) && (!isNxmLink(arguments.at(1)))) { + if ((arguments.size() > 1) + && !isNxmLink(arguments.at(1))) { QString exeName = arguments.at(1); qDebug("starting %s from command line", qPrintable(exeName)); arguments.removeFirst(); // remove application name (ModOrganizer.exe) @@ -553,8 +554,8 @@ int main(int argc, char *argv[]) qDebug("displaying main window"); mainWindow.show(); - if ((arguments.size() > 1) && - (isNxmLink(arguments.at(1)))) { + if ((arguments.size() > 1) + && isNxmLink(arguments.at(1))) { qDebug("starting download from command line: %s", qPrintable(arguments.at(1))); organizer.externalMessage(arguments.at(1)); } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 08de0da6..3265981d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2245,8 +2245,9 @@ void MainWindow::resumeDownload(int downloadIndex) } else { QString username, password; if (m_OrganizerCore.settings().getNexusLogin(username, password)) { - //m_PostLoginTasks.push_back(boost::bind(&MainWindow::resumeDownload, _1, downloadIndex)); - m_OrganizerCore.doAfterLogin([this, downloadIndex] () { this->resumeDownload(downloadIndex); }); + m_OrganizerCore.doAfterLogin([this, downloadIndex] () { + this->resumeDownload(downloadIndex); + }); NexusInterface::instance()->getAccessManager()->login(username, password); } else { MessageDialog::showMessage(tr("You need to be logged in with Nexus to resume a download"), this); diff --git a/src/moapplication.cpp b/src/moapplication.cpp index 84806af6..46b9677b 100644 --- a/src/moapplication.cpp +++ b/src/moapplication.cpp @@ -142,7 +142,6 @@ void MOApplication::updateStyle(const QString &fileName) setStyleSheet(""); #endif } else { - qDebug("restore default style: %s", qPrintable(m_DefaultStyle)); setStyle(new ProxyStyle(QStyleFactory::create(m_DefaultStyle))); if (QFile::exists(fileName)) { setStyleSheet(QString("file:///%1").arg(fileName)); diff --git a/src/modlist.cpp b/src/modlist.cpp index 3aed1d4c..74aa542d 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -83,6 +83,7 @@ void ModList::setProfile(Profile *profile) { m_Profile = profile; } + int ModList::rowCount(const QModelIndex &parent) const { if (!parent.isValid()) { diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index d3ffcdcb..e7d493a7 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -576,7 +576,6 @@ void PluginList::lockESPIndex(int index, bool lock) m_LockedOrder.erase(iter); } } -qDebug(__FUNCTION__); emit writePluginsList(); } diff --git a/src/savegameinfowidget.cpp b/src/savegameinfowidget.cpp index 13cad272..3a1cdf91 100644 --- a/src/savegameinfowidget.cpp +++ b/src/savegameinfowidget.cpp @@ -25,11 +25,13 @@ along with Mod Organizer. If not, see . SaveGameInfoWidget::SaveGameInfoWidget(QWidget *parent) - : QWidget(parent), ui(new Ui::SaveGameInfoWidget) + : QWidget(parent) + , ui(new Ui::SaveGameInfoWidget) { ui->setupUi(this); this->setWindowFlags(Qt::ToolTip | Qt::BypassGraphicsProxyWidget); setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, 0, this) / qreal(255.0)); + ui->gameFrame->setBackgroundRole(QPalette::ToolTipBase); // installEventFilter(this); } diff --git a/src/savegameinfowidget.ui b/src/savegameinfowidget.ui index 2b0c921b..e2e9588c 100644 --- a/src/savegameinfowidget.ui +++ b/src/savegameinfowidget.ui @@ -169,421 +169,6 @@ 0 - - - - - - - 0 - 0 - 0 - - - - - - - 170 - 0 - 127 - - - - - - - 255 - 0 - 191 - - - - - - - 212 - 0 - 159 - - - - - - - 85 - 0 - 63 - - - - - - - 113 - 0 - 84 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 170 - 0 - 127 - - - - - - - 0 - 0 - 0 - - - - - - - 212 - 127 - 191 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 170 - 0 - 127 - - - - - - - 255 - 0 - 191 - - - - - - - 212 - 0 - 159 - - - - - - - 85 - 0 - 63 - - - - - - - 113 - 0 - 84 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 170 - 0 - 127 - - - - - - - 0 - 0 - 0 - - - - - - - 212 - 127 - 191 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 85 - 0 - 63 - - - - - - - 170 - 0 - 127 - - - - - - - 255 - 0 - 191 - - - - - - - 212 - 0 - 159 - - - - - - - 85 - 0 - 63 - - - - - - - 113 - 0 - 84 - - - - - - - 85 - 0 - 63 - - - - - - - 255 - 255 - 255 - - - - - - - 85 - 0 - 63 - - - - - - - 170 - 0 - 127 - - - - - - - 170 - 0 - 127 - - - - - - - 0 - 0 - 0 - - - - - - - 170 - 0 - 127 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - QFrame::StyledPanel diff --git a/src/settings.cpp b/src/settings.cpp index 71eb37d5..88d97006 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -182,11 +182,6 @@ QString Settings::getSteamAppID() const return m_Settings.value("Settings/app_id", m_GamePlugin->steamAPPId()).toString(); } -QString Settings::getDownloadDirectory() const -{ - return getConfigurablePath("download_directory", ToQString(AppConfig::downloadPath())); -} - void Settings::setDownloadSpeed(const QString &serverName, int bytesPerSecond) { m_Settings.beginGroup("Servers"); @@ -223,7 +218,12 @@ std::map Settings::getPreferredServers() QString Settings::getConfigurablePath(const QString &key, const QString &def) const { - return m_Settings.value(QString("settings/") + key, qApp->property("dataPath").toString() + "/" + def).toString(); + return QDir::fromNativeSeparators(m_Settings.value(QString("settings/") + key, qApp->property("dataPath").toString() + "/" + def).toString()); +} + +QString Settings::getDownloadDirectory() const +{ + return getConfigurablePath("download_directory", ToQString(AppConfig::downloadPath())); } QString Settings::getCacheDirectory() const diff --git a/src/stylesheets/dracula.qss b/src/stylesheets/dracula.qss index de247940..058affcf 100644 --- a/src/stylesheets/dracula.qss +++ b/src/stylesheets/dracula.qss @@ -84,6 +84,7 @@ QPushButton { border: 1px solid #5f6161; border-radius: 2px; margin: 1px; + padding: 0.2em 0.8em 0.2em 0.8em; } QPushButton:hover { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 #64686b, stop:1 #494c4e); @@ -155,7 +156,7 @@ QTabWidget::pane:left { } QTabBar::tab { border: 1px solid #292b2d; - padding: 4px; + padding: 0.2em 0.8em 0.2em 0.8em; } QTabBar::tab:top { border-top-left-radius: 4px; diff --git a/src/version.rc b/src/version.rc index 65168b9c..2e963eed 100644 --- a/src/version.rc +++ b/src/version.rc @@ -1,7 +1,7 @@ #include "Winver.h" -#define VER_FILEVERSION 1,3,5,0 -#define VER_FILEVERSION_STR "1,3,5,0\0" +#define VER_FILEVERSION 1,3,6,0 +#define VER_FILEVERSION_STR "1,3,6,0\0" VS_VERSION_INFO VERSIONINFO FILEVERSION VER_FILEVERSION -- cgit v1.3.1