From f4ba65007496c242beb0a32b21e2d1ffca7fc151 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Thu, 3 Aug 2023 07:39:54 +0300 Subject: [PATCH] kdeplasma-addons: set the minimum time to 1sec for timer and frame applet where zero time timers do not make sense, e.g. when the frame applet slideshow should be updated (never updating the slideshow automatically could be a feature because the frame shows arrows to switch between images but zero time for the slideshow is not handled by the frame applet) Signed-off-by: Ivailo Monev --- kdeplasma-addons/applets/frame/frame.cpp | 1 + kdeplasma-addons/applets/timer/customtimeeditor.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/kdeplasma-addons/applets/frame/frame.cpp b/kdeplasma-addons/applets/frame/frame.cpp index 73feddc6..ba1027ee 100644 --- a/kdeplasma-addons/applets/frame/frame.cpp +++ b/kdeplasma-addons/applets/frame/frame.cpp @@ -583,6 +583,7 @@ void Frame::createConfigurationInterface(KConfigDialog *parent) m_configDialog->imageUi.slideShowDirList->clear(); m_configDialog->imageUi.slideShowDirList->addItems(m_slideShowPaths); m_configDialog->imageUi.removeDirButton->setEnabled(!m_slideShowPaths.isEmpty()); + m_configDialog->imageUi.slideShowDelay->setMinimumTime(QTime(0, 0, 1)); m_configDialog->imageUi.slideShowDelay->setTime(QTime(m_slideshowTime / 3600, (m_slideshowTime / 60) % 60, m_slideshowTime % 60)); m_configDialog->previewPicture(m_mySlideShow->image()); m_configDialog->imageUi.autoUpdateTime->setTime(QTime(m_autoUpdateIntervall / 3600, (m_autoUpdateIntervall / 60) % 60, m_autoUpdateIntervall % 60)); diff --git a/kdeplasma-addons/applets/timer/customtimeeditor.cpp b/kdeplasma-addons/applets/timer/customtimeeditor.cpp index b93feb83..f6d81f86 100644 --- a/kdeplasma-addons/applets/timer/customtimeeditor.cpp +++ b/kdeplasma-addons/applets/timer/customtimeeditor.cpp @@ -29,6 +29,7 @@ CustomTimeEditor::CustomTimeEditor() : QObject() { timeEdit=new KTimeEdit(); + timeEdit->setMinimumTime(QTime(0, 0, 1)); editor=new KLineEdit(); customEditor=new KEditListWidget::CustomEditor(timeEdit, editor); connect(timeEdit, SIGNAL(timeChanged(QTime)), this, SLOT(setEdit(QTime)));