Share pages refactoring
This commit is contained in:
parent
396af917b5
commit
836075de10
15 changed files with 222 additions and 622 deletions
|
|
@ -697,4 +697,13 @@ void UiLogic::setTrayState(VpnProtocol::ConnectionState state)
|
|||
}
|
||||
|
||||
|
||||
bool UiLogic::saveTextFile(const QString& desc, const QString& ext, const QString& data)
|
||||
{
|
||||
QString fileName = QFileDialog::getSaveFileName(nullptr, desc,
|
||||
QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation), ext);
|
||||
|
||||
QSaveFile save(fileName);
|
||||
save.open(QIODevice::WriteOnly);
|
||||
save.write(data.toUtf8());
|
||||
return save.commit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue