Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
394cad3f
Commit
394cad3f
authored
Apr 12, 2010
by
Thorbjørn Lindeijer
Browse files
Options
Downloads
Patches
Plain Diff
Override IOptionsPage::matches for ShortcutSettings page
It wasn't finding this page when looking for 'shortcut'.
parent
9c8079f0
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/coreplugin/dialogs/shortcutsettings.cpp
+21
-6
21 additions, 6 deletions
src/plugins/coreplugin/dialogs/shortcutsettings.cpp
src/plugins/coreplugin/dialogs/shortcutsettings.h
+3
-0
3 additions, 0 deletions
src/plugins/coreplugin/dialogs/shortcutsettings.h
with
24 additions
and
6 deletions
src/plugins/coreplugin/dialogs/shortcutsettings.cpp
+
21
−
6
View file @
394cad3f
...
@@ -39,7 +39,6 @@
...
@@ -39,7 +39,6 @@
#include
<utils/treewidgetcolumnstretcher.h>
#include
<utils/treewidgetcolumnstretcher.h>
#include
<QtGui/QKeyEvent>
#include
<QtGui/QKeyEvent>
#include
<QtGui/QShortcut>
#include
<QtGui/QShortcut>
#include
<QtGui/QHeaderView>
#include
<QtGui/QHeaderView>
...
@@ -98,10 +97,21 @@ QWidget *ShortcutSettings::createPage(QWidget *parent)
...
@@ -98,10 +97,21 @@ QWidget *ShortcutSettings::createPage(QWidget *parent)
m_keyNum
=
m_key
[
0
]
=
m_key
[
1
]
=
m_key
[
2
]
=
m_key
[
3
]
=
0
;
m_keyNum
=
m_key
[
0
]
=
m_key
[
1
]
=
m_key
[
2
]
=
m_key
[
3
]
=
0
;
QWidget
*
w
=
CommandMappings
::
createPage
(
parent
);
QWidget
*
w
=
CommandMappings
::
createPage
(
parent
);
setPageTitle
(
tr
(
"Keyboard Shortcuts"
));
setTargetLabelText
(
tr
(
"Shortcut:"
));
const
QString
pageTitle
=
tr
(
"Keyboard Shortcuts"
);
setTargetEditTitle
(
tr
(
"Keyboard Shortcuts"
));
const
QString
targetLabelText
=
tr
(
"Key sequence:"
);
setTargetHeader
(
tr
(
"Shortcut"
));
const
QString
editTitle
=
tr
(
"Shortcut"
);
setPageTitle
(
pageTitle
);
setTargetLabelText
(
targetLabelText
);
setTargetEditTitle
(
editTitle
);
setTargetHeader
(
editTitle
);
if
(
m_searchKeywords
.
isEmpty
())
{
QTextStream
(
&
m_searchKeywords
)
<<
' '
<<
pageTitle
<<
' '
<<
targetLabelText
<<
' '
<<
editTitle
;
}
return
w
;
return
w
;
}
}
...
@@ -120,6 +130,11 @@ void ShortcutSettings::finish()
...
@@ -120,6 +130,11 @@ void ShortcutSettings::finish()
CommandMappings
::
finish
();
CommandMappings
::
finish
();
}
}
bool
ShortcutSettings
::
matches
(
const
QString
&
s
)
const
{
return
m_searchKeywords
.
contains
(
s
,
Qt
::
CaseInsensitive
);
}
bool
ShortcutSettings
::
eventFilter
(
QObject
*
o
,
QEvent
*
e
)
bool
ShortcutSettings
::
eventFilter
(
QObject
*
o
,
QEvent
*
e
)
{
{
Q_UNUSED
(
o
)
Q_UNUSED
(
o
)
...
...
This diff is collapsed.
Click to expand it.
src/plugins/coreplugin/dialogs/shortcutsettings.h
+
3
−
0
View file @
394cad3f
...
@@ -73,6 +73,7 @@ public:
...
@@ -73,6 +73,7 @@ public:
QWidget
*
createPage
(
QWidget
*
parent
);
QWidget
*
createPage
(
QWidget
*
parent
);
void
apply
();
void
apply
();
void
finish
();
void
finish
();
bool
matches
(
const
QString
&
s
)
const
;
protected:
protected:
bool
eventFilter
(
QObject
*
o
,
QEvent
*
e
);
bool
eventFilter
(
QObject
*
o
,
QEvent
*
e
);
...
@@ -97,6 +98,8 @@ private:
...
@@ -97,6 +98,8 @@ private:
QList
<
ShortcutItem
*>
m_scitems
;
QList
<
ShortcutItem
*>
m_scitems
;
int
m_key
[
4
],
m_keyNum
;
int
m_key
[
4
],
m_keyNum
;
QString
m_searchKeywords
;
};
};
}
// namespace Internal
}
// namespace Internal
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment