diff --git a/engine/sc_report_html_player.cpp b/engine/sc_report_html_player.cpp
index 2a37f6414..0a894ac5b 100644
--- a/engine/sc_report_html_player.cpp
+++ b/engine/sc_report_html_player.cpp
@@ -1987,7 +1987,7 @@ static void print_html_player_buffs( FILE* file, player_t* p )
if ( uptime > 0 )
{
fprintf( file,
- "\t\t\t\t\t\t\t\t\t\t
%s_%zd:%.1f%%\n",
+ "\t\t\t\t\t\t\t\t\t\t%s_%d:%.1f%%\n",
b -> name(), j,
uptime * 100.0 );
}
diff --git a/qt/main.cpp b/qt/main.cpp
index d0094b1c6..5476849d7 100644
--- a/qt/main.cpp
+++ b/qt/main.cpp
@@ -1,6 +1,10 @@
#include
-#include
#include
+#ifdef QT_VERSION_5
+#include
+#else
+#include
+#endif
#include "simulationcraftqt.hpp"
#ifndef SIMC_NO_AUTOUPDATE
#include "sc_autoupdate.h"
diff --git a/qt/sc_window.cpp b/qt/sc_window.cpp
index 2430a6149..8ca848d65 100644
--- a/qt/sc_window.cpp
+++ b/qt/sc_window.cpp
@@ -490,7 +490,6 @@ void SimulationCraftWindow::createCmdLine()
cmdLineLayout->addWidget( mainButton = new QPushButton( "Simulate!" ) );
backButton->setMaximumWidth( 30 );
forwardButton->setMaximumWidth( 30 );
- progressBar->setStyle( new QPlastiqueStyle() );
progressBar->setMaximum( 100 );
progressBar->setMaximumWidth( 200 );
progressBar->setMinimumWidth( 150 );
@@ -865,12 +864,12 @@ void SimulationCraftWindow::createCustomTab()
customGlyphsTab = new QWidget();
customGlyphsTab->setObjectName( QString::fromUtf8( "customGlyphsTab" ) );
createCustomProfileDock->addTab( customGlyphsTab, QString() );
- createCustomProfileDock->setTabText( createCustomProfileDock->indexOf( customGearTab ), QApplication::translate( "createCustomTab", "Gear", 0, QApplication::UnicodeUTF8 ) );
- createCustomProfileDock->setTabToolTip( createCustomProfileDock->indexOf( customGearTab ), QApplication::translate( "createCustomTab", "Customise Gear Setup", 0, QApplication::UnicodeUTF8 ) );
- createCustomProfileDock->setTabText( createCustomProfileDock->indexOf( customTalentsTab ), QApplication::translate( "createCustomTab", "Talents", 0, QApplication::UnicodeUTF8 ) );
- createCustomProfileDock->setTabToolTip( createCustomProfileDock->indexOf( customTalentsTab ), QApplication::translate( "createCustomTab", "Customise Talents", 0, QApplication::UnicodeUTF8 ) );
- createCustomProfileDock->setTabText( createCustomProfileDock->indexOf( customGlyphsTab ), QApplication::translate( "createCustomTab", "Glyphs", 0, QApplication::UnicodeUTF8 ) );
- createCustomProfileDock->setTabToolTip( createCustomProfileDock->indexOf( customGlyphsTab ), QApplication::translate( "createCustomTab", "Customise Glyphs", 0, QApplication::UnicodeUTF8 ) );
+ createCustomProfileDock -> setTabText( createCustomProfileDock -> indexOf( customGearTab ), tr( "Gear", "createCustomTab" ) );
+ createCustomProfileDock -> setTabToolTip( createCustomProfileDock -> indexOf( customGearTab ), tr( "Customise Gear Setup", "createCustomTab" ) );
+ createCustomProfileDock -> setTabText( createCustomProfileDock -> indexOf( customTalentsTab ), tr( "Talents", "createCustomTab" ) );
+ createCustomProfileDock -> setTabToolTip( createCustomProfileDock -> indexOf( customTalentsTab ), tr( "Customise Talents", "createCustomTab" ) );
+ createCustomProfileDock -> setTabText( createCustomProfileDock -> indexOf( customGlyphsTab ), tr( "Glyphs", "createCustomTab" ) );
+ createCustomProfileDock -> setTabToolTip( createCustomProfileDock -> indexOf( customGlyphsTab ), tr( "Customise Glyphs", "createCustomTab" ) );
}
void SimulationCraftWindow::createSimulateTab()
@@ -1211,10 +1210,11 @@ void SimulationCraftWindow::importFinished()
void SimulateThread::run()
{
+ QByteArray utf8_profile = options.toUtf8();
QFile file( "simc_gui.simc" );
if ( file.open( QIODevice::WriteOnly ) )
{
- file.write( options.toAscii() );
+ file.write( utf8_profile );
file.close();
}
@@ -1479,7 +1479,7 @@ void SimulationCraftWindow::saveLog()
if ( file.open( QIODevice::WriteOnly ) )
{
- file.write( logText->toPlainText().toAscii() );
+ file.write( logText->toPlainText().toUtf8() );
file.close();
}
@@ -1499,7 +1499,7 @@ void SimulationCraftWindow::saveResults()
if ( file.open( QIODevice::WriteOnly ) )
{
- file.write( visibleWebView->property("resultHTML").toString().toAscii() );
+ file.write( visibleWebView->property("resultHTML").toString().toUtf8() );
file.close();
}
@@ -1711,7 +1711,7 @@ void SimulationCraftWindow::historyDoubleClicked( QListWidgetItem* item )
if ( mrRobotBuilderView )
{
- mrRobotBuilderView->setUrl( QUrl::fromEncoded( url.toAscii() ) );
+ mrRobotBuilderView->setUrl( QUrl::fromEncoded( url.toUtf8() ) );
importTab->setCurrentIndex( TAB_MR_ROBOT );
}
}
diff --git a/qt/simulationcraftqt.hpp b/qt/simulationcraftqt.hpp
index 70fe53810..5961fcf15 100644
--- a/qt/simulationcraftqt.hpp
+++ b/qt/simulationcraftqt.hpp
@@ -9,6 +9,10 @@
#include "simulationcraft.hpp"
#include
#include
+#ifdef QT_VERSION_5
+#include
+#include
+#endif
enum master_tabs {
TAB_WELCOME,
diff --git a/simcqt.pro b/simcqt.pro
index ae9917aa5..d8710cd0c 100644
--- a/simcqt.pro
+++ b/simcqt.pro
@@ -8,6 +8,11 @@ exists( build.conf ) {
include( build.conf )
}
+contains ( QT_MAJOR_VERSION , 5 ) {
+QT += widgets webkitwidgets
+DEFINES += QT_VERSION_5
+}
+
QMAKE_CXXFLAGS += $$OPTS
QMAKE_CXXFLAGS_RELEASE += -DNDEBUG