Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
4.8.5, 5.3.1
-
Windows
-
5.4: 0aa84a619ea0a7c85a1ed48ed28817d4c7e40b33, Qt 4: 45de76f8e071edcf77bc3bd006f052fe5b3f01fc
Description
QLineEdit cut operation(CTRL+X) is not disabled when there is no selection.
Here is the code and steps how to reproduce the problem.
Steps how to reproduce:
1. Launch application
2. Move cursor position to start
3. Launch context menu and you can see "Cut" is disabled. Close the context menu.
4. Press CTRL+X
Actual result:
4. Text is cut off even when there is no selection.
Expected result:
4. Shortcut combination should be disabled when there is no selection.
#include "mainwindow.h" #include <QApplication> #include <QLineEdit> int main(int argc, char *argv[]) { QApplication a(argc, argv); QLineEdit *le = new QLineEdit; le->setText("abcdefgh"); le->show(); return a.exec(); }
Patch proposals attached.