Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
Krfb
Commits
c729e9e0
Commit
c729e9e0
authored
Jul 09, 2021
by
Laurent Montel
😁
Browse files
Modernize code
parent
45548e02
Changes
4
Hide whitespace changes
Inline
Side-by-side
framebuffers/pipewire/pw_framebuffer.cpp
View file @
c729e9e0
...
...
@@ -561,7 +561,7 @@ void PWFrameBuffer::Private::onStreamStateChanged(void *data, pw_stream_state /*
void
PWFrameBuffer
::
Private
::
onStreamParamChanged
(
void
*
data
,
uint32_t
id
,
const
struct
spa_pod
*
format
)
{
qInfo
()
<<
"Stream format changed"
;
auto
*
d
=
static_cast
<
PWFrameBuffer
::
Private
*>
(
data
);
auto
d
=
static_cast
<
PWFrameBuffer
::
Private
*>
(
data
);
if
(
!
format
||
id
!=
SPA_PARAM_Format
)
{
return
;
...
...
@@ -614,7 +614,7 @@ void PWFrameBuffer::Private::onStreamParamChanged(void *data, uint32_t id, const
*/
void
PWFrameBuffer
::
Private
::
onStreamProcess
(
void
*
data
)
{
auto
*
d
=
static_cast
<
PWFrameBuffer
::
Private
*>
(
data
);
auto
d
=
static_cast
<
PWFrameBuffer
::
Private
*>
(
data
);
pw_buffer
*
next_buffer
;
pw_buffer
*
buffer
=
nullptr
;
...
...
@@ -640,7 +640,7 @@ void PWFrameBuffer::Private::onStreamProcess(void *data)
void
PWFrameBuffer
::
Private
::
handleFrame
(
pw_buffer
*
pwBuffer
)
{
auto
*
spaBuffer
=
pwBuffer
->
buffer
;
auto
spaBuffer
=
pwBuffer
->
buffer
;
uint8_t
*
src
=
nullptr
;
if
(
spaBuffer
->
datas
[
0
].
chunk
->
size
==
0
)
{
...
...
framebuffers/pipewire/pw_framebuffer.h
View file @
c729e9e0
...
...
@@ -24,11 +24,11 @@ class PWFrameBuffer: public FrameBuffer
{
Q_OBJECT
public:
typedef
struct
{
using
Stream
=
struct
{
uint
nodeId
;
QVariantMap
map
;
}
Stream
;
typedef
QList
<
Stream
>
Streams
;
};
using
Streams
=
QList
<
Stream
>
;
PWFrameBuffer
(
WId
winid
,
QObject
*
parent
=
nullptr
);
virtual
~
PWFrameBuffer
()
override
;
...
...
krfb/connectiondialog.cpp
View file @
c729e9e0
...
...
@@ -37,9 +37,9 @@ ConnectionDialog<UI>::ConnectionDialog(QWidget *parent)
:
QDialog
(
parent
)
{
setWindowTitle
(
i18n
(
"New Connection"
));
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
auto
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
auto
mainWidget
=
new
QWidget
(
this
);
auto
mainLayout
=
new
QVBoxLayout
;
setLayout
(
mainLayout
);
mainLayout
->
addWidget
(
mainWidget
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
...
...
krfb/mainwindow.cpp
View file @
c729e9e0
...
...
@@ -107,7 +107,7 @@ MainWindow::MainWindow(QWidget *parent)
m_passwordLineEdit
->
setVisible
(
false
);
m_passwordLineEdit
->
setAlignment
(
Qt
::
AlignHCenter
);
QWidget
*
mainWidget
=
new
QWidget
;
auto
mainWidget
=
new
QWidget
;
m_ui
.
setupUi
(
mainWidget
);
m_ui
.
krfbIconLabel
->
setPixmap
(
QIcon
::
fromTheme
(
QStringLiteral
(
"krfb"
)).
pixmap
(
128
));
m_ui
.
enableUnattendedCheckBox
->
setChecked
(
...
...
@@ -252,7 +252,7 @@ void MainWindow::showConfiguration()
return
;
}
KConfigDialog
*
dialog
=
new
KConfigDialog
(
this
,
QStringLiteral
(
"settings"
),
KrfbConfig
::
self
());
auto
dialog
=
new
KConfigDialog
(
this
,
QStringLiteral
(
"settings"
),
KrfbConfig
::
self
());
dialog
->
addPage
(
new
TCP
,
i18n
(
"Network"
),
QStringLiteral
(
"network-wired"
));
dialog
->
addPage
(
new
Security
,
i18n
(
"Security"
),
QStringLiteral
(
"security-high"
));
dialog
->
addPage
(
new
ConfigFramebuffer
,
i18n
(
"Screen capture"
),
QStringLiteral
(
"video-display"
));
...
...
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