Fix change folder restart crash, added tooltip on session switches

This commit is contained in:
Mark Watkins 2014-10-11 10:44:30 +10:00
parent e038d291e2
commit dac961d981
2 changed files with 4 additions and 4 deletions

View File

@ -942,12 +942,12 @@ QString Daily::getSessionInformation(Day * day)
int s1=len % 60; int s1=len % 60;
Session *sess=*s; Session *sess=*s;
bool b=sess->enabled();
QString tooltip = QObject::tr("Click to %1 this session.").arg(sess->enabled() ? QObject::tr("disable") : QObject::tr("enable"));
html+=QString("<tr class='datarow2'><td colspan=5 align=center>%2</td></tr>" html+=QString("<tr class='datarow2'><td colspan=5 align=center>%2</td></tr>"
"<tr class='datarow2'>" "<tr class='datarow2'>"
"<td width=26><a href='toggle"+type+"session=%1'>" "<td width=26><a href='toggle"+type+"session=%1'>"
"<img src='qrc:/icons/session-%4.png' width=24px></a></td>" "<img src='qrc:/icons/session-%4.png' width=24px title=\""+tooltip+"\"></a></td>"
"<td align=left>%5</td>" "<td align=left>%5</td>"
"<td align=left>%6</td>" "<td align=left>%6</td>"
"<td align=left>%7</td>" "<td align=left>%7</td>"
@ -956,7 +956,7 @@ QString Daily::getSessionInformation(Day * day)
.arg((*s)->session()) .arg((*s)->session())
.arg(QObject::tr("%1 Session #%2").arg((*s)->machine()->loaderName()).arg((*s)->session(),8,10,QChar('0'))) .arg(QObject::tr("%1 Session #%2").arg((*s)->machine()->loaderName()).arg((*s)->session(),8,10,QChar('0')))
.arg(QString("%1h %2m %3s").arg(h,2,10,QChar('0')).arg(m,2,10,QChar('0')).arg(s1,2,10,QChar('0'))) .arg(QString("%1h %2m %3s").arg(h,2,10,QChar('0')).arg(m,2,10,QChar('0')).arg(s1,2,10,QChar('0')))
.arg((b ? "on" : "off")) .arg((sess->enabled() ? "on" : "off"))
.arg(fd.date().toString(Qt::SystemLocaleShortDate)) .arg(fd.date().toString(Qt::SystemLocaleShortDate))
.arg(fd.toString("HH:mm:ss")) .arg(fd.toString("HH:mm:ss"))
.arg(ld.toString("HH:mm:ss")); .arg(ld.toString("HH:mm:ss"));

View File

@ -1918,7 +1918,7 @@ void MainWindow::on_action_Rebuild_Oximetry_Index_triggered()
void MainWindow::RestartApplication(bool force_login, QString cmdline) void MainWindow::RestartApplication(bool force_login, QString cmdline)
{ {
p_profile->removeLock(); if (p_profile) p_profile->removeLock();
QString apppath; QString apppath;
#ifdef Q_OS_MAC #ifdef Q_OS_MAC