MCPcopy Create free account
hub / github.com/LunarG/VulkanTools / UpdatePerExecutableConfigurations

Method UpdatePerExecutableConfigurations

vkconfig_gui/tab_configurations.cpp:1350–1386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1348void TabConfigurations::on_configurations_list_itemChanged(QListWidgetItem *item) { this->OnRenameConfiguration(item); }
1349
1350void TabConfigurations::UpdatePerExecutableConfigurations() {
1351 Configurator &configurator = Configurator::Get();
1352 if (configurator.GetExecutableScope() != EXECUTABLE_PER) {
1353 return;
1354 }
1355
1356 Configuration *configuration = configurator.GetActiveConfiguration();
1357 if (configuration == nullptr) {
1358 return;
1359 }
1360
1361 std::vector<Path> updated_executable_paths;
1362 if (configurator.executables.UpdateConfigurations(updated_executable_paths)) {
1363 if (!configurator.Get(HIDE_MESSAGE_NOTIFICATION_PER_CONFIG_UPDATE)) {
1364 QMessageBox message;
1365 message.setWindowTitle("Vulkan Executable Layers Configuration Updated");
1366 message.setText(
1367 format("Per Executable Layers Configuration Scope requires that all executables with the same working "
1368 "directory use the same layers configuration. The following executables were switch to '%s' configuration:",
1369 configuration->key.c_str())
1370 .c_str());
1371 std::string informative;
1372 for (std::size_t i = 0, n = updated_executable_paths.size(); i < n; ++i) {
1373 informative += format("- %s\n", updated_executable_paths[i].RelativePath().c_str());
1374 }
1375
1376 message.setInformativeText(informative.c_str());
1377 message.setIcon(QMessageBox::Warning);
1378 message.setCheckBox(new QCheckBox("Do not show again."));
1379 message.exec();
1380
1381 if (message.checkBox()->isChecked()) {
1382 configurator.Set(HIDE_MESSAGE_NOTIFICATION_PER_CONFIG_UPDATE);
1383 }
1384 }
1385 }
1386}
1387
1388void TabConfigurations::on_configurations_list_currentRowChanged(int currentRow) {
1389 this->_settings_tree_manager.CleanupGUI();

Calls 8

GetFunction · 0.85
GetExecutableScopeMethod · 0.80
GetMethod · 0.80
RelativePathMethod · 0.80
SetMethod · 0.80
formatFunction · 0.50
UpdateConfigurationsMethod · 0.45

Tested by

no test coverage detected