Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Q
qglobalshortcut
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abby Cin
qglobalshortcut
Commits
4727211c
Commit
4727211c
authored
Aug 16, 2019
by
abbycin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix linux command line compile error
parent
495fa523
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
qglobalshortcut.cc
lib/qglobalshortcut.cc
+0
-6
qglobalshortcut.h
lib/qglobalshortcut.h
+9
-1
qglobalshortcut_x11.cc
lib/qglobalshortcut_x11.cc
+0
-4
No files found.
lib/qglobalshortcut.cc
View file @
4727211c
...
...
@@ -99,12 +99,6 @@ quint32 QGlobalShortcut::calcId(const QKeySequence& keyseq) {
return
calcId
(
keycode
,
mods
);
}
#ifndef Q_OS_UNIX
quint32
QGlobalShortcut
::
calcId
(
quint32
k
,
quint32
m
)
{
return
k
|
m
;
}
#endif
Qt
::
Key
QGlobalShortcut
::
getKey
(
const
QKeySequence
&
keyseq
)
{
if
(
keyseq
.
isEmpty
())
{
return
Qt
::
Key
(
0
);
...
...
lib/qglobalshortcut.h
View file @
4727211c
...
...
@@ -42,7 +42,15 @@ private:
static
QMultiHash
<
quint32
,
QGlobalShortcut
*>
shortcuts_
;
static
bool
activate
(
quint32
id
);
static
inline
quint32
calcId
(
const
QKeySequence
&
keyseq
);
static
inline
quint32
calcId
(
quint32
k
,
quint32
m
);
#ifdef Q_OS_WIN
static
quint32
calcId
(
quint32
k
,
quint32
m
)
{
return
k
|
m
;
}
#else
static
quint32
calcId
(
quint32
k
,
quint32
m
)
{
return
k
|
(
m
<<
16
);
}
#endif
static
inline
Qt
::
Key
getKey
(
const
QKeySequence
&
keyseq
);
static
inline
Qt
::
KeyboardModifiers
getMods
(
const
QKeySequence
&
keyseq
);
static
quint32
toNativeKeycode
(
Qt
::
Key
k
);
...
...
lib/qglobalshortcut_x11.cc
View file @
4727211c
...
...
@@ -20,10 +20,6 @@ bool QGlobalShortcut::QGlobalShortcutEventFilter::nativeEventFilter(
return
false
;
}
quint32
QGlobalShortcut
::
calcId
(
quint32
k
,
quint32
m
)
{
return
k
|
(
m
<<
16
);
}
quint32
QGlobalShortcut
::
toNativeKeycode
(
Qt
::
Key
k
)
{
/* keysymdef.h */
quint32
key
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment