Commit c729e9e0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code

parent 45548e02
......@@ -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) {
......
......@@ -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;
......
......@@ -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);
......
......@@ -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"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment