- QFileInfo fi(wResults->currentItem()->text());
- QDesktopServices::openUrl(QUrl(QString("file:///%1").arg(fi.path())));
+ QString t = wResults->currentItem()->text();
+ t.replace("?", "\0453f");
+ QFileInfo fi(t);
+ QDesktopServices::openUrl(QUrl::fromEncoded(QString("file:///%1").arg(fi.path()).toUtf8()));
+ }
+}
+
+void FileFinder::GUI::Module::copyName()
+{
+ if (wResults->currentItem()) {
+ QClipboard * cb = QApplication::clipboard();
+ if (cb)
+ cb->setText(wResults->currentItem()->text());
+ }
+}
+
+void FileFinder::GUI::Module::copyAllNames()
+{
+#ifdef Q_OS_WIN32
+ static char const * const EOLN = "\r\n";
+#else
+ static char const * const EOLN = "\n";
+#endif
+
+ QString t;
+ for (int i = 0; i < wResults->count(); ++i)
+ t.append(wResults->item(i)->text() + EOLN);
+ if (!t.isEmpty()) {
+ QClipboard * cb = QApplication::clipboard();
+ if (cb)
+ cb->setText(t);