]> granicus.if.org Git - transmission/commitdiff
#5774: Fix alternative speed limits scheduled times (once more)
authorMike Gelfand <mikedld@mikedld.com>
Fri, 6 Feb 2015 20:08:36 +0000 (20:08 +0000)
committerMike Gelfand <mikedld@mikedld.com>
Fri, 6 Feb 2015 20:08:36 +0000 (20:08 +0000)
qt/prefs-dialog.cc

index 494d8f420ea938445203c556232ae422def83218..9c5baee0f33c515616a560d7ffd71c3bac9d1220 100644 (file)
@@ -123,7 +123,7 @@ PrefsDialog::updateWidgetValue (QWidget * widget, int prefKey)
   else if (auto w = qobject_cast<QDoubleSpinBox*> (widget))
     w->setValue (myPrefs.getDouble (prefKey));
   else if (auto w = qobject_cast<QTimeEdit*> (widget))
-    w->setTime (QTime ().addSecs (myPrefs.getInt(prefKey) * 60));
+    w->setTime (QTime (0, 0).addSecs (myPrefs.getInt(prefKey) * 60));
   else if (auto w = qobject_cast<QLineEdit*> (widget))
     w->setText (myPrefs.getString (prefKey));
   else if (auto w = qobject_cast<TrPathButton*> (widget))
@@ -176,7 +176,7 @@ void
 PrefsDialog::timeEditingFinished ()
 {
   if (auto e = qobject_cast<const QTimeEdit*> (sender ()))
-    setPref(getPrefKey (e), QTime ().secsTo (e->time()) / 60);
+    setPref(getPrefKey (e), QTime (0, 0).secsTo (e->time()) / 60);
 }
 
 void