Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
971694c2
Commit
971694c2
authored
Oct 25, 2016
by
Martin Flöser
Browse files
[tools] Generate eventQueue methods only for global classes
The event queue gets set by the factory method for resource classes.
parent
568ab112
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/wayland/tools/generator.cpp
View file @
971694c2
...
...
@@ -930,16 +930,6 @@ void Generator::generateClientCpp(const Interface &interface)
" d->%2.destroy();
\n
"
"}
\n
"
"
\n
"
"void %1::setEventQueue(EventQueue *queue)
\n
"
"{
\n
"
" d->queue = queue;
\n
"
"}
\n
"
"
\n
"
"EventQueue *%1::eventQueue()
\n
"
"{
\n
"
" return d->queue;
\n
"
"}
\n
"
"
\n
"
"%1::operator %3*() {
\n
"
" return d->%2;
\n
"
"}
\n
"
...
...
@@ -956,6 +946,20 @@ void Generator::generateClientCpp(const Interface &interface)
*
m_stream
.
localData
()
<<
templateString
.
arg
(
interface
.
kwaylandClientName
())
.
arg
(
interface
.
kwaylandClientName
().
toLower
())
.
arg
(
interface
.
name
());
if
(
interface
.
isGlobal
())
{
const
QString
templateStringGlobal
=
QStringLiteral
(
"void %1::setEventQueue(EventQueue *queue)
\n
"
"{
\n
"
" d->queue = queue;
\n
"
"}
\n
"
"
\n
"
"EventQueue *%1::eventQueue()
\n
"
"{
\n
"
" return d->queue;
\n
"
"}
\n\n
"
);
*
m_stream
.
localData
()
<<
templateStringGlobal
.
arg
(
interface
.
kwaylandClientName
());
}
}
void
Generator
::
generateClientGlobalClassDoxy
(
const
Interface
&
interface
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment