mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 05:13:30 -07:00
Merge pull request #786 from Gelmir/inputDlg_autoexpand
Resize input dialogs to fit contents
This commit is contained in:
commit
4cd4ad457b
15 changed files with 338 additions and 40 deletions
|
@ -39,10 +39,10 @@
|
|||
#include "qbtsession.h"
|
||||
#include "iconprovider.h"
|
||||
#include "fs_utils.h"
|
||||
#include "autoexpandabledialog.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
#include <QInputDialog>
|
||||
#include <QUrl>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
|
@ -399,7 +399,7 @@ void AddNewTorrentDialog::renameSelectedFile()
|
|||
const QModelIndex &index = selectedIndexes.first();
|
||||
// Ask for new name
|
||||
bool ok;
|
||||
const QString new_name_last = QInputDialog::getText(this, tr("Rename the file"),
|
||||
const QString new_name_last = AutoExpandableDialog::getText(this, tr("Rename the file"),
|
||||
tr("New name:"), QLineEdit::Normal,
|
||||
index.data().toString(), &ok).trimmed();
|
||||
if (ok && !new_name_last.isEmpty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue