-rw-r--r-- | noncore/settings/netsystemtime/timetabwidget.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/noncore/settings/netsystemtime/timetabwidget.cpp b/noncore/settings/netsystemtime/timetabwidget.cpp index bcfbdf7..895514b 100644 --- a/noncore/settings/netsystemtime/timetabwidget.cpp +++ b/noncore/settings/netsystemtime/timetabwidget.cpp | |||
@@ -51,4 +51,6 @@ | |||
51 | #include <qscrollview.h> | 51 | #include <qscrollview.h> |
52 | #include <qspinbox.h> | 52 | #include <qspinbox.h> |
53 | #include <qmessagebox.h> | ||
54 | #include <qfile.h> | ||
53 | 55 | ||
54 | #include <stdlib.h> | 56 | #include <stdlib.h> |
@@ -278,4 +280,10 @@ void TimeTabWidget::slotWeekStartChanged( int monday ) | |||
278 | void TimeTabWidget::slotTZChanged( const QString &newtz ) | 280 | void TimeTabWidget::slotTZChanged( const QString &newtz ) |
279 | { | 281 | { |
282 | // Check timezone has a valid file in /usr/share/zoneinfo | ||
283 | if(!QFile::exists("/usr/share/zoneinfo/" + newtz)) { | ||
284 | QMessageBox::warning(this, tr("Time zone file missing"), | ||
285 | (tr("There is no time zone file for the\nselected time zone (%1).\nYou will need to install it before the\nsystem time zone can be set correctly.")).arg(newtz)); | ||
286 | } | ||
287 | else { | ||
280 | // If controls have a valid date & time, update systemtime | 288 | // If controls have a valid date & time, update systemtime |
281 | int hour = sbHour->value(); | 289 | int hour = sbHour->value(); |
@@ -308,2 +316,3 @@ void TimeTabWidget::slotTZChanged( const QString &newtz ) | |||
308 | emit tzChanged( newtz ); | 316 | emit tzChanged( newtz ); |
309 | } | 317 | } |
318 | } | ||