Changeset View
Changeset View
Standalone View
Standalone View
src/kdefrontend/datasources/ImportFileWidget.cpp
Show First 20 Lines • Show All 759 Lines • ▼ Show 20 Line(s) | 759 | if (newDir != dir) | |||
---|---|---|---|---|---|
760 | conf.writeEntry(QLatin1String("LastDir"), newDir); | 760 | conf.writeEntry(QLatin1String("LastDir"), newDir); | ||
761 | } | 761 | } | ||
762 | 762 | | |||
763 | //process all events after the FileDialog was closed to repaint the widget | 763 | //process all events after the FileDialog was closed to repaint the widget | ||
764 | //before we start calculating the preview | 764 | //before we start calculating the preview | ||
765 | QApplication::processEvents(QEventLoop::AllEvents, 0); | 765 | QApplication::processEvents(QEventLoop::AllEvents, 0); | ||
766 | 766 | | |||
767 | QStringList urls = m_cbFileName->urls(); | 767 | QStringList urls = m_cbFileName->urls(); | ||
768 | urls.append(path); | 768 | urls.insert(0, "file://"+path); // add type of path | ||
769 | m_cbFileName->setUrls(urls); | 769 | m_cbFileName->setUrls(urls); | ||
770 | fileNameChanged(urls.last()); // why do I have to call this function seperately | 770 | m_cbFileName->setCurrentText(urls.first()); | ||
771 | fileNameChanged(path); // why do I have to call this function seperately | ||||
771 | } | 772 | } | ||
772 | 773 | | |||
773 | /*! | 774 | /*! | ||
774 | hides the MQTT related items of the widget | 775 | hides the MQTT related items of the widget | ||
775 | */ | 776 | */ | ||
776 | void ImportFileWidget::setMQTTVisible(bool visible) { | 777 | void ImportFileWidget::setMQTTVisible(bool visible) { | ||
777 | ui.lConnections->setVisible(visible); | 778 | ui.lConnections->setVisible(visible); | ||
778 | ui.cbConnection->setVisible(visible); | 779 | ui.cbConnection->setVisible(visible); | ||
▲ Show 20 Lines • Show All 1332 Lines • Show Last 20 Lines |