Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class Backend : public QObject {
// Called for org.freedesktop.FileManager1: open a folder, or open the
// folder holding a file and select it.
void showFolder(const QString &path);
void showItem(const QString &path);
Q_INVOKABLE void showItem(const QString &path);

static QString expandTyped(const QString &text, const QString &home, const QString &current);
static QString complete(const QString &text, const QString &home, const QString &current);
Expand Down
3 changes: 2 additions & 1 deletion tests/folio_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3315,7 +3315,8 @@ private slots:
QTemporaryDir home;
write(home.filePath("report.pdf"), "x");
Backend backend(home.path());
backend.showItem(home.filePath("report.pdf"));
// As QML calls it, through the meta-object system.
QVERIFY(QMetaObject::invokeMethod(&backend, "showItem", Q_ARG(QString, home.filePath("report.pdf"))));
QCOMPARE(backend.path(), home.path());
QCOMPARE(backend.takeSelection(), QString("report.pdf"));
}
Expand Down