Commit 0772a90d authored by Huff, Israel's avatar Huff, Israel
Browse files

Fortify changes

parent 0a636677
Pipeline #67542 passed with stages
in 15 minutes and 49 seconds
......@@ -20,15 +20,15 @@ struct KeyboardLayoutEntry
const KeyboardLayoutEntry keyboardLayout[] = {{Qt::Key_7, "7"},
{Qt::Key_8, "8"},
{Qt::Key_9, "9"},
{NEXT_ROW_MARKER, 0},
{NEXT_ROW_MARKER, nullptr},
{Qt::Key_4, "4"},
{Qt::Key_5, "5"},
{Qt::Key_6, "6"},
{NEXT_ROW_MARKER, 0},
{NEXT_ROW_MARKER, nullptr},
{Qt::Key_1, "1"},
{Qt::Key_2, "2"},
{Qt::Key_3, "3"},
{NEXT_ROW_MARKER, 0},
{NEXT_ROW_MARKER, nullptr},
{Qt::Key_0, "0"},
{Qt::Key_Period, "."},
{Qt::Key_Backspace, "Backspace"}};
......@@ -86,9 +86,10 @@ NumberPadWidget::NumberPadWidget(QWidget *parent)
void NumberPadWidget::buttonClicked(int key)
{
QLineEdit::keyPressEvent(new QKeyEvent(QEvent::KeyPress, key, Qt::NoModifier,
keyToCharacter(key)));
QKeyEvent event(QEvent::KeyPress, key, Qt::NoModifier, keyToCharacter(key));
QLineEdit::keyPressEvent(&event);
}
void NumberPadWidget::focusInEvent(QFocusEvent *event)
{
QLineEdit::focusInEvent(event);
......
......@@ -2,7 +2,6 @@
#include <iostream>
#include <QLabel>
#include <QTabBar>
#include <QToolButton>
......@@ -20,7 +19,8 @@ TabWidget::TabWidget(QWidget *parent)
mNewButton->setToolTip("Add new tab");
mNewButton->setMaximumWidth(25);
addTab(new QLabel(""), QString(""));
mLabel = new QLabel("");
addTab(mLabel, QString(""));
QWidget *newTabWidget = widget(0);
newTabWidget->setObjectName("tabwidget_new_tab");
tabBar()->setTabButton(0, QTabBar::RightSide, mNewButton);
......
#ifndef RADIX_RADIXWIDGETS_TABWIDGET_HH_
#define RADIX_RADIXWIDGETS_TABWIDGET_HH_
#include <QLabel>
#include <QPushButton>
#include <QTabWidget>
......@@ -20,6 +21,7 @@ class RADIX_PUBLIC TabWidget : public QTabWidget
private:
QPushButton *mNewButton;
QLabel *mLabel;
signals:
void addTabRequested();
......
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