mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Restore BitTorrent session asynchronously
Reduce the total startup time of the application and maintain sufficient responsiveness of the UI during startup due to the following: 1. Load resume data from disk asynchronously in separate thread; 2. Split handling of loaded resume data in chunks; 3. Reduce the number of emitting signals. PR #16840.
This commit is contained in:
parent
ec1d2cba40
commit
be7cfb78de
25 changed files with 927 additions and 553 deletions
|
@ -1205,12 +1205,12 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
|
|||
{
|
||||
if (event->matches(QKeySequence::Paste))
|
||||
{
|
||||
const QMimeData *mimeData {QGuiApplication::clipboard()->mimeData()};
|
||||
const QMimeData *mimeData = QGuiApplication::clipboard()->mimeData();
|
||||
|
||||
if (mimeData->hasText())
|
||||
{
|
||||
const bool useTorrentAdditionDialog {AddNewTorrentDialog::isEnabled()};
|
||||
const QStringList lines {mimeData->text().split(u'\n', Qt::SkipEmptyParts)};
|
||||
const bool useTorrentAdditionDialog = AddNewTorrentDialog::isEnabled();
|
||||
const QStringList lines = mimeData->text().split(u'\n', Qt::SkipEmptyParts);
|
||||
|
||||
for (QString line : lines)
|
||||
{
|
||||
|
@ -1438,6 +1438,7 @@ void MainWindow::dragEnterEvent(QDragEnterEvent *event)
|
|||
{
|
||||
for (const QString &mime : asConst(event->mimeData()->formats()))
|
||||
qDebug("mimeData: %s", mime.toLocal8Bit().data());
|
||||
|
||||
if (event->mimeData()->hasFormat(u"text/plain"_qs) || event->mimeData()->hasFormat(u"text/uri-list"_qs))
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue