Font AntiAliasing back on.. it's a Qt bug. :( added version check on startup

This commit is contained in:
Mark Watkins 2011-08-07 12:46:42 +10:00
parent 75b7970041
commit e6f31b69d0
2 changed files with 7 additions and 3 deletions

View File

@ -30,7 +30,7 @@ void InitGraphs()
bigfont=new QFont("Sans Serif",35);
mediumfont=new QFont("Sans Serif",10);
defaultfont->setStyleHint(QFont::SansSerif,QFont::OpenGLCompatible);
mediumfont->setStyleHint(QFont::SansSerif,QFont::NoAntialias);
mediumfont->setStyleHint(QFont::SansSerif,QFont::OpenGLCompatible);
bigfont->setStyleHint(QFont::SansSerif,QFont::OpenGLCompatible);
for (int i=0;i<num_vert_arrays;i++) {

View File

@ -80,7 +80,11 @@ MainWindow::MainWindow(QWidget *parent) :
Profiles::Scan();
pref["AppName"]="SleepyHead";
pref["VersionString"]=QString("v%1.%2.%3").arg(major_version).arg(minor_version).arg(revision_number);
QString Version=QString("%1.%2.%3").arg(major_version).arg(minor_version).arg(revision_number);
if (pref.Exists("VersionString") && pref["VersionString"]!=Version) {
QMessageBox::warning(this,"Potential Crash Warning","This is a new version of SleepyHead. If you experience a crash right after clicking Ok, you will need to manually delete your SleepApp folder (which is currently located in your Documents folder), and things should then work normally.",QMessageBox::Ok);
}
pref["VersionString"]=Version;
if (!pref.Exists("Profile")) pref["Profile"]=getUserName();
@ -146,7 +150,7 @@ MainWindow::~MainWindow()
void MainWindow::Startup()
{
qDebug() << pref["AppName"].toString().toAscii() << pref["VersionString"].toString().toAscii() << "built with Qt"<< QT_VERSION_STR << "on" << __DATE__ << __TIME__;
qDebug() << pref["AppName"].toString().toAscii()+" v"+pref["VersionString"].toString().toAscii() << "built with Qt"<< QT_VERSION_STR << "on" << __DATE__ << __TIME__;
qstatus->setText(tr("Loading Data"));
qprogress->show();
//qstatusbar->showMessage(tr("Loading Data"),0);