mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
cleanup: fix incorrect QFuture return value
I'm a abit confused why that didn't cause an error with Qt5. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
df610752c7
commit
325addf385
3 changed files with 4 additions and 4 deletions
|
@ -246,7 +246,7 @@ void DiveLogExportDialog::on_buttonBox_accepted()
|
||||||
qPrefDisplay::set_lastDir(fileInfo.dir().path());
|
qPrefDisplay::set_lastDir(fileInfo.dir().path());
|
||||||
// the non XSLT exports are called directly above, the XSLT based ons are called here
|
// the non XSLT exports are called directly above, the XSLT based ons are called here
|
||||||
if (!stylesheet.isEmpty()) {
|
if (!stylesheet.isEmpty()) {
|
||||||
QFuture<void> future = exportUsingStyleSheet(filename, ui->exportSelected->isChecked(),
|
QFuture<int> future = exportUsingStyleSheet(filename, ui->exportSelected->isChecked(),
|
||||||
ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8(), ui->anonymize->isChecked());
|
ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8(), ui->anonymize->isChecked());
|
||||||
MainWindow::instance()->getNotificationWidget()->showNotification(tr("Please wait, exporting..."), KMessageWidget::Information);
|
MainWindow::instance()->getNotificationWidget()->showNotification(tr("Please wait, exporting..."), KMessageWidget::Information);
|
||||||
MainWindow::instance()->getNotificationWidget()->setFuture(future);
|
MainWindow::instance()->getNotificationWidget()->setFuture(future);
|
||||||
|
|
|
@ -31,7 +31,7 @@ QString NotificationWidget::getNotificationText()
|
||||||
return text();
|
return text();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotificationWidget::setFuture(const QFuture<void> &future)
|
void NotificationWidget::setFuture(const QFuture<int> &future)
|
||||||
{
|
{
|
||||||
future_watcher.setFuture(future);
|
future_watcher.setFuture(future);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ class NotificationWidget : public KMessageWidget {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit NotificationWidget(QWidget *parent = 0);
|
explicit NotificationWidget(QWidget *parent = 0);
|
||||||
void setFuture(const QFuture<void> &future);
|
void setFuture(const QFuture<int> &future);
|
||||||
void showNotification(QString message, KMessageWidget::MessageType type);
|
void showNotification(QString message, KMessageWidget::MessageType type);
|
||||||
void hideNotification();
|
void hideNotification();
|
||||||
QString getNotificationText();
|
QString getNotificationText();
|
||||||
|
@ -25,7 +25,7 @@ public
|
||||||
slots:
|
slots:
|
||||||
void showError(QString message);
|
void showError(QString message);
|
||||||
private:
|
private:
|
||||||
QFutureWatcher<void> future_watcher;
|
QFutureWatcher<int> future_watcher;
|
||||||
|
|
||||||
private
|
private
|
||||||
slots:
|
slots:
|
||||||
|
|
Loading…
Add table
Reference in a new issue