mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
HistoryManager: Pressing Del key now removes selected entries
This commit is contained in:
parent
bcb633fcd0
commit
ea7f4dd58f
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - Qt web browser
|
||||||
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -83,6 +83,17 @@ void HistoryManager::clearHistory()
|
|||||||
mApp->history()->clearHistory();
|
mApp->history()->clearHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HistoryManager::keyPressEvent(QKeyEvent *event)
|
||||||
|
{
|
||||||
|
switch (event->key()) {
|
||||||
|
case Qt::Key_Delete:
|
||||||
|
ui->historyTree->removeSelectedItems();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget::keyPressEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
void HistoryManager::search(const QString &searchText)
|
void HistoryManager::search(const QString &searchText)
|
||||||
{
|
{
|
||||||
ui->historyTree->search(searchText);
|
ui->historyTree->search(searchText);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - Qt web browser
|
||||||
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -66,6 +66,8 @@ private slots:
|
|||||||
void clearHistory();
|
void clearHistory();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void keyPressEvent(QKeyEvent *event) override;
|
||||||
|
|
||||||
BrowserWindow* getWindow();
|
BrowserWindow* getWindow();
|
||||||
|
|
||||||
Ui::HistoryManager* ui;
|
Ui::HistoryManager* ui;
|
||||||
|
Loading…
Reference in New Issue
Block a user