MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / getOpenFileName

Function getOpenFileName

src/qt/guiutil.cpp:353–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir,
354 const QString &filter,
355 QString *selectedSuffixOut)
356{
357 QString selectedFilter;
358 QString myDir;
359 if(dir.isEmpty()) // Default to user documents location
360 {
361 myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
362 }
363 else
364 {
365 myDir = dir;
366 }
367 /* Directly convert path to native OS path separators */
368 QString result = QDir::toNativeSeparators(QFileDialog::getOpenFileName(parent, caption, myDir, filter, &selectedFilter));
369
370 if(selectedSuffixOut)
371 {
372 *selectedSuffixOut = ExtractFirstSuffixFromFilter(selectedFilter);
373 ;
374 }
375 return result;
376}
377
378Qt::ConnectionType blockingGUIThreadConnection()
379{

Callers 2

createActionsMethod · 0.85
gotoLoadPSBTMethod · 0.85

Calls 1

Tested by

no test coverage detected