aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window/MainWindowSlotFunction.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-11-24 20:17:43 +0000
committersaturneric <[email protected]>2024-11-24 20:17:43 +0000
commitb4e556d834a0c1e1cedbbda0a91cd892f9105d20 (patch)
tree6fe99ac300a8643daa7177b8f83820acb097f9aa /src/ui/main_window/MainWindowSlotFunction.cpp
parentfix: solve key list drag and drop refreshing issue (diff)
downloadGpgFrontend-b4e556d834a0c1e1cedbbda0a91cd892f9105d20.tar.gz
GpgFrontend-b4e556d834a0c1e1cedbbda0a91cd892f9105d20.zip
feat: allow drag and drop to open text file
Diffstat (limited to 'src/ui/main_window/MainWindowSlotFunction.cpp')
-rw-r--r--src/ui/main_window/MainWindowSlotFunction.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/ui/main_window/MainWindowSlotFunction.cpp b/src/ui/main_window/MainWindowSlotFunction.cpp
index cea105b7..9a8e57d0 100644
--- a/src/ui/main_window/MainWindowSlotFunction.cpp
+++ b/src/ui/main_window/MainWindowSlotFunction.cpp
@@ -276,23 +276,6 @@ void MainWindow::upload_key_to_server() {
}
void MainWindow::SlotOpenFile(const QString& path) {
- QFileInfo const info(path);
- if (!info.isFile() || !info.isReadable()) {
- QMessageBox::critical(
- this, tr("Error"),
- tr("Cannot open this file. Please make sure that this "
- "is a regular file and it's readable."));
- return;
- }
-
- if (info.size() > static_cast<qint64>(1024 * 1024)) {
- QMessageBox::critical(
- this, tr("Error"),
- tr("Cannot open this file. The file is TOO LARGE (>1MB) for "
- "GpgFrontend Text Editor."));
- return;
- }
-
edit_->SlotOpenFile(path);
}