MCPcopy Create free account
hub / github.com/cutechess/cutechess / setPath

Method setPath

projects/gui/src/pathlineedit.cpp:58–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void PathLineEdit::setPath(const QString& path)
59{
60 QString finalPath(path);
61 if (!path.isEmpty() && m_defaultDir.exists())
62 {
63 QString tmp = m_defaultDir.relativeFilePath(path);
64 if (!tmp.startsWith(".."))
65 finalPath = tmp;
66 }
67
68 if (!finalPath.isEmpty())
69 setText(finalPath);
70}
71
72void PathLineEdit::browse()
73{

Callers 1

setDefaultDirectoryMethod · 0.80

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected