MCPcopy Create free account
hub / github.com/TheAssassin/AppImageLauncher / onAddDirectoryToWatchButtonClicked

Method onAddDirectoryToWatchButtonClicked

src/ui/settings_dialog.cpp:197–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197void SettingsDialog::onAddDirectoryToWatchButtonClicked() {
198 QFileDialog fileDialog(this);
199
200 fileDialog.setFileMode(QFileDialog::DirectoryOnly);
201 fileDialog.setWindowTitle(tr("Select additional directory to watch"));
202 fileDialog.setDirectory(QStandardPaths::locate(QStandardPaths::HomeLocation, ".", QStandardPaths::LocateDirectory));
203
204 // Gtk+ >= 3 segfaults when trying to use the native dialog, therefore we need to enforce the Qt one
205 // See #218 for more information
206 fileDialog.setOption(QFileDialog::DontUseNativeDialog, true);
207
208 if (fileDialog.exec()) {
209 QString dirPath = fileDialog.selectedFiles().first();
210 addDirectoryToWatchToListView(dirPath);
211 }
212}
213
214void SettingsDialog::onRemoveDirectoryToWatchButtonClicked() {
215 auto* widget = ui->additionalDirsListWidget;

Callers

nothing calls this directly

Calls 1

execMethod · 0.45

Tested by

no test coverage detected