[Kst] kdeextragear-2/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Fri Aug 27 01:17:33 CEST 2004
CVS commit by rchern:
QListBox::currentItem() seems to return a non -1 value even if no item is selected, for some reason.
M +8 -2 kstquickstartdialog_i.cpp 1.5
M +2 -0 kstquickstartdialog_i.h 1.3
--- kdeextragear-2/kst/kst/kstquickstartdialog_i.cpp #1.4:1.5
@@ -37,5 +37,5 @@ KstQuickStartDialogI::KstQuickStartDialo
connect(_recentFileList, SIGNAL(highlighted(const QString&)), this, SLOT(changeURL(const QString&)));
connect(_showAtStartup, SIGNAL(clicked()), this, SLOT(updateSettings()));
- connect(_fileName, SIGNAL(textChanged(const QString&)), _recentFileList, SLOT(clearSelection()));
+ connect(_fileName, SIGNAL(textChanged(const QString&)), this, SLOT(deselectRecentFile()));
connect(_recentFileList, SIGNAL(selected(const QString&)), this, SLOT(open_I()));
}
@@ -51,5 +51,5 @@ void KstQuickStartDialogI::wizard_I() {
void KstQuickStartDialogI::open_I() {
- if (_recentFileList->currentItem() >= 0) {
+ if (_isRecentFile) {
if (_app->slotFileOpenRecent(_fileName->url())) {
close();
@@ -84,4 +84,5 @@ void KstQuickStartDialogI::changeURL(con
_fileName->setURL(name);
_fileName->blockSignals(false);
+ _isRecentFile = true;
}
@@ -91,4 +92,9 @@ void KstQuickStartDialogI::updateSetting
emit settingsChanged();
}
+
+void KstQuickStartDialogI::deselectRecentFile() {
+ _recentFileList->clearSelection();
+ _isRecentFile = false;
+}
#include "kstquickstartdialog_i.moc"
// vim: et ts=2 sw=2
--- kdeextragear-2/kst/kst/kstquickstartdialog_i.h #1.2:1.3
@@ -38,7 +38,9 @@ class KstQuickStartDialogI : public KstQ
void changeURL(const QString& name);
void updateSettings();
+ void deselectRecentFile();
private:
KstApp* _app;
+ bool _isRecentFile;
signals:
More information about the Kst
mailing list