| 576 | } |
| 577 | |
| 578 | void ThemeEditorDialog::importThemeFromPath(const QString& filePath) |
| 579 | { |
| 580 | auto& tm = ThemeManager::instance(); |
| 581 | QString err; |
| 582 | const QString name = tm.importThemeFromFile(filePath, &err); |
| 583 | if (name.isEmpty()) { |
| 584 | QMessageBox::warning(this, QStringLiteral("Import failed"), |
| 585 | QStringLiteral("Could not import \"%1\":\n\n%2").arg(filePath, err)); |
| 586 | return; |
| 587 | } |
| 588 | QMessageBox::information(this, QStringLiteral("Theme imported"), |
| 589 | QStringLiteral("Installed \"%1\" and made it the active theme.").arg(name)); |
| 590 | } |
| 591 | |
| 592 | void ThemeEditorDialog::dragEnterEvent(QDragEnterEvent* event) |
| 593 | { |
nothing calls this directly
no test coverage detected