MCPcopy Create free account
hub / github.com/cxasm/notepad-- / showFileInExplorer

Function showFileInExplorer

src/rcglobal.cpp:55–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void showFileInExplorer(QString path)
56{
57 QString cmd;
58
59#ifdef _WIN32
60 path = path.replace("/", "\\");
61 cmd = QString("explorer.exe /select,%1").arg(path);
62#endif
63
64#ifdef ubu
65 path = path.replace("\\", "/");
66 cmd = QString("nautilus %1").arg(path);
67#endif
68
69#ifdef uos
70 path = path.replace("\\", "/");
71 cmd = QString("dde-file-manager %1").arg(path);
72#endif
73
74#if defined(Q_OS_MAC)
75 path = path.replace("\\", "/");
76 cmd = QString("open -R %1").arg(path);
77#endif
78
79 QProcess process;
80 process.startDetached(cmd);
81}

Callers 6

slot_ShowPopMenuMethod · 0.85
slot_openPluginDirMethod · 0.85
slot_ShowPopMenuMethod · 0.85
slot_itemClickedMethod · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected