diff --git a/src/InkjetPlumber.plist b/src/InkjetPlumber.plist
index 54b88b4..998f098 100644
--- a/src/InkjetPlumber.plist
+++ b/src/InkjetPlumber.plist
@@ -19,7 +19,7 @@
CFBundleIdentifier
org.threeputt.Inkjet Plumber
CFBundleVersion
- 0.9.10
+ 0.9.11
NOTE
This file was generated by Qt/QMake.
SUAutomaticallyUpdate
diff --git a/src/Sparkle b/src/Sparkle
index 1ff1577..b5c9539 160000
--- a/src/Sparkle
+++ b/src/Sparkle
@@ -1 +1 @@
-Subproject commit 1ff1577108686f267092708bb41df0627ae42c68
+Subproject commit b5c9539f16de5b8647418fc467c6ca8fd5c8d22c
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 29739c8..66f395e 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -82,7 +82,7 @@ MainWindow::MainWindow(QWidget *parent)
QAction *action_about = app_menu_->addAction("About Inkjet Plumber...");
action_about->setObjectName("action_about");
action_about->setMenuRole(QAction::AboutRole);
- action_about->setShortcut(Qt::CTRL+Qt::Key_A);
+ action_about->setShortcut(Qt::CTRL|Qt::Key_A);
#if defined(Q_OS_OSX)
QAction *action_update = app_menu_->addAction("Check for Update...");
@@ -92,7 +92,7 @@ MainWindow::MainWindow(QWidget *parent)
#endif
QAction *action_prefs = app_menu_->addAction("Preferences...");
- action_prefs->setShortcut(Qt::CTRL+Qt::Key_Comma);
+ action_prefs->setShortcut(Qt::CTRL|Qt::Key_Comma);
action_prefs->setObjectName("action_prefs");
action_prefs->setMenuRole(QAction::PreferencesRole);
@@ -115,14 +115,14 @@ MainWindow::MainWindow(QWidget *parent)
tray_menu_->setShortcutEnabled(true);
QAction *tray_action_about = new QAction("About Inkjet Plumber...");
- tray_action_about->setShortcut(Qt::CTRL+Qt::Key_A);
+ tray_action_about->setShortcut(Qt::CTRL|Qt::Key_A);
QAction *tray_action_prefs = new QAction("Preferences...");
- tray_action_prefs->setShortcut(Qt::CTRL+Qt::Key_Comma);
+ tray_action_prefs->setShortcut(Qt::CTRL|Qt::Key_Comma);
#if defined(Q_OS_OSX)
QAction *tray_action_update = new QAction("Check for Update...");
- tray_action_update->setShortcut(Qt::CTRL+Qt::Key_U);
+ tray_action_update->setShortcut(Qt::CTRL|Qt::Key_U);
#endif
QAction *tray_action_show = new QAction("Show Inkjet Plumber");
@@ -371,11 +371,11 @@ void MainWindow::generate_custom_page(MaintenanceJob *job, QPrinter *printer)
{
text += "Page/Paper Information
";
text += "page size = " + page_size.name() + "
";
- text += "page width = " + QString::number(printer->pageRect().width()) + " dpi
";
- text += "page height = " + QString::number(printer->pageRect().height()) + " dpi
";
- text += "paper size = " + printer->paperName() + "
";
- text += "paper width = " + QString::number(printer->paperRect().width()) + " dpi
";
- text += "paper height = " + QString::number(printer->paperRect().height()) + " dpi
";
+ text += "page width = " + QString::number(printer->pageRect(QPrinter::Inch).width()) + " dpi
";
+ text += "page height = " + QString::number(printer->pageRect(QPrinter::Inch).height()) + " dpi
";
+ text += "paper size = " + printer->pageLayout().pageSize().name() + "
";
+ text += "paper width = " + QString::number(printer->paperRect(QPrinter::Inch).width()) + " dpi
";
+ text += "paper height = " + QString::number(printer->paperRect(QPrinter::Inch).height()) + " dpi
";
}
if (page_paper_info_ || printer_info_)
@@ -385,7 +385,7 @@ void MainWindow::generate_custom_page(MaintenanceJob *job, QPrinter *printer)
QTextDocument doc;
doc.setDefaultFont(tahoma);
doc.documentLayout()->setPaintDevice(painter.device());
- doc.setPageSize(printer->pageRect().size());
+ doc.setPageSize(printer->pageRect(QPrinter::Inch).size());
doc.setHtml(text);
doc.drawContents(&painter);
painter.restore();
@@ -597,12 +597,10 @@ void MainWindow::print_generated_test_page(MaintenanceJob *job)
printer.setCopyCount(1);
printer.setCreator("Inkjet Plumber");
printer.setDocName("Inkjet Plumber Maintenance Job");
- printer.setDoubleSidedPrinting(false);
printer.setDuplex(QPrinter::DuplexNone);
printer.setFullPage(true);
printer.setPageLayout(page_layout);
- printer.setPageSize(QPrinter::Letter);
- printer.setPaperSize(QPrinter::Letter);
+ printer.setPageSize(QPageSize(QPageSize::Letter));
printer.setPaperSource(QPrinter::Auto);
printer.setPrinterName(job->printer_name);
@@ -772,7 +770,7 @@ void MainWindow::run_maint_job(MaintenanceJob *job)
log_message("Maintenance job sent to " + job->printer_name + ", next job = " + next_maint.toString("yyyy-MM-dd hh:mm:ss."));
tray_.showMessage("Inkjet Plumber", "Maintenance job sent to " + job->printer_name);
- QDateTime earliest_date(QDate(2016,7,1));
+ QDateTime earliest_date(QDate(2016,7,1), QTime());
if (job->last_maint.isValid() && job->last_maint > earliest_date)
{
@@ -855,7 +853,7 @@ void MainWindow::show_printer_info(const QString &printer_name) const
QString last_maint;
QString next_maint;
- QDateTime epoch(QDate(2016,7,1));
+ QDateTime epoch(QDate(2016,7,1), QTime());
if (job->last_maint.isValid() && job->last_maint > epoch)
{
diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp
index c62a728..11192cf 100644
--- a/src/preferencesdialog.cpp
+++ b/src/preferencesdialog.cpp
@@ -292,7 +292,7 @@ void PreferencesDialog::setup_printer_settings(int current_row)
ui->checkBox_run_maintenance->setChecked(job->enabled);
ui->lineEdit_hours->setEnabled(job->enabled);
ui->lineEdit_hours->setText(QString::number(job->hours));
- QDateTime epoch(QDate(2016,7,1));
+ QDateTime epoch(QDate(2016,7,1), QTime());
if (current_job_->last_maint.isValid() && current_job_->last_maint > epoch)
{
ui->label_last_maint->setText(current_job_->last_maint.toString("yyyy-MM-dd hh:mm:ss"));
diff --git a/src/sparkleautoupdater.mm b/src/sparkleautoupdater.mm
index 315a83d..f969da4 100644
--- a/src/sparkleautoupdater.mm
+++ b/src/sparkleautoupdater.mm
@@ -120,7 +120,7 @@
ti = [aNSDate timeIntervalSince1970];
}
- return QDateTime::fromTime_t(ti);
+ return QDateTime::fromMSecsSinceEpoch(ti);
}
void SparkleAutoUpdater::resetUpdateCycle()
diff --git a/src/version.h b/src/version.h
index c6ae090..e95b2ed 100644
--- a/src/version.h
+++ b/src/version.h
@@ -20,6 +20,6 @@
#ifndef VERSION_H
#define VERSION_H
-#define INKJETPLUMBER_VERSION "0.9.10"
+#define INKJETPLUMBER_VERSION "0.9.11"
#endif // VERSION_H