MCPcopy Create free account
hub / github.com/QNapi/qnapi / selectDirectory

Method selectDirectory

gui/src/qnapiopendialog.cpp:92–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92bool QNapiOpenDialog::selectDirectory() {
93#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
94 files.clear();
95 QString dir = getExistingDirectory(this, windowTitle(), directory().path());
96
97 if (dir == directory().path()) dir = "";
98
99 if (!dir.isEmpty()) files << dir;
100
101 return !dir.isEmpty();
102#else
103 if (!placeWindow()) return false;
104 // QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks ?
105 setFileMode(QFileDialog::DirectoryOnly);
106 return exec();
107#endif
108}
109
110#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
111QStringList QNapiOpenDialog::selectedFiles() const { return files; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected