Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-899

Back and Forward mouse button are not working correctly (sugg. fix included! ;)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • Qt Creator 1.3.1
    • Editors, Help System
    • None
    • 2.6.31-20-generic #57-Ubuntu SMP Mon Feb 8 09:02:26 UTC 2010 x86_64 GNU/Linux
    • fb82e101eaf183bd923d03fd976f6d06512af515 1bb0d91900f5e3e9a0c905c4d98f1f40d33f200a

    Description

      It seems like the mouse back and forward (Qt::XButton1 and Qt::XButton2) are meant to work in the help browser (QtAssistant) but aren't very usefull since they stop working of your mouse moves (even slightly) between the button press and release. And in the source editor window, it's not even handled at all.

      I have observed that for example in firefox, this button is handled in the press event instead of the release. I have patched 1.3.1 to do it similarly:

      diff -r qt-creator-1.3.1-src/src/plugins/texteditor/basetexteditor.cpp qt-creator-1.3.1-src.mod/src/plugins/texteditor/basetexteditor.cpp
      2950a2951,2963
      >
      > if (e->button() == Qt::XButton1)

      { > Core::ICore::instance()->actionManager()->command(Core::Constants::GO_BACK)->action()->activate(QAction::Trigger); > e->accept(); > return; > }

      >
      > if (e->button() == Qt::XButton2)

      { > Core::ICore::instance()->actionManager()->command(Core::Constants::GO_FORWARD)->action()->activate(QAction::Trigger); > e->accept(); > return; > }

      >
      diff -r qt-creator-1.3.1-src/src/shared/help/helpviewer.cpp qt-creator-1.3.1-src.mod/src/shared/help/helpviewer.cpp
      339,348d338
      < if (e->button() == Qt::XButton1)

      { < triggerPageAction(QWebPage::Back); < return; < }

      <
      < if (e->button() == Qt::XButton2)

      { < triggerPageAction(QWebPage::Forward); < return; < }

      <
      364a355,365
      > if (event->button() == Qt::XButton1)

      { > triggerPageAction(QWebPage::Back); > event->accept(); > return; > }

      >
      > if (event->button() == Qt::XButton2)

      { > triggerPageAction(QWebPage::Forward); > event->accept(); > return; > }

      Attachments

        1. back_fwd.diff
          3 kB
          Jeff Dagenais

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              lindeije Thorbjørn Lindeijer (closed Nokia identity) (Inactive)
              dagenaisj Jeff Dagenais
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes