| 229 | } |
| 230 | |
| 231 | void MessageHandlerWidget::saveFileLogConfig(bool all) |
| 232 | { |
| 233 | QString fileName = QFileDialog::getSaveFileName(this, |
| 234 | tr("Save File"), |
| 235 | {}, |
| 236 | tr("Config Files (*.ini)")); |
| 237 | |
| 238 | if (!fileName.isEmpty()) { |
| 239 | QFile file(fileName); |
| 240 | if (!file.open(QFile::WriteOnly)) { |
| 241 | qWarning() << "Failed to save file" << fileName << file.errorString(); |
| 242 | return; |
| 243 | } |
| 244 | |
| 245 | QByteArray config; |
| 246 | auto model = ui->categoriesView->model(); |
| 247 | model->metaObject()->invokeMethod(model, "exportLoggingConfig", Q_RETURN_ARG(QByteArray, config), Q_ARG(bool, all), Q_ARG(bool, true)); |
| 248 | file.write(config); |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | void MessageHandlerWidget::exportModLogConfig() |
| 253 | { |
nothing calls this directly
no test coverage detected