Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
ad788bbc
Commit
ad788bbc
authored
Aug 14, 2019
by
Huff, Israel
Browse files
Fortify changes
parent
131fc83d
Pipeline
#67175
passed with stages
in 15 minutes and 29 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
radixcore/stringfunctions.cc
View file @
ad788bbc
...
...
@@ -132,8 +132,9 @@ std::string remove_extra_whitespace(const std::string &inputStr)
struct
std
::
tm
utc_to_time
(
const
std
::
string
&
time
,
int
&
zone
,
int
&
daylight
)
{
int
year
=
0
,
month
=
0
,
day
=
0
,
hour
=
0
,
minute
=
0
,
second
=
0
;
sscanf
(
time
.
c_str
(),
"%d-%d-%dT%d:%d:%d-%d:%d"
,
&
year
,
&
month
,
&
day
,
&
hour
,
&
minute
,
&
second
,
&
zone
,
&
daylight
);
int
count
=
sscanf
(
time
.
c_str
(),
"%d-%d-%dT%d:%d:%d-%d:%d"
,
&
year
,
&
month
,
&
day
,
&
hour
,
&
minute
,
&
second
,
&
zone
,
&
daylight
);
(
void
)
sizeof
(
count
);
radix_line
(
"utc_to_time elements: "
<<
count
);
struct
std
::
tm
res
;
res
.
tm_year
=
year
;
...
...
radixwidgets/navigationactionmanager.cc
View file @
ad788bbc
...
...
@@ -24,6 +24,8 @@ NavigationActionManager::NavigationActionManager(QObject *parent)
{
}
void
NavigationActionManager
::
deleter
(
PImpl
*
impl
)
{
delete
impl
;
}
void
NavigationActionManager
::
registerAction
(
NavigationItem
*
item
,
QString
text
,
std
::
function
<
void
()
>
functor
)
{
...
...
radixwidgets/navigationactionmanager.hh
View file @
ad788bbc
...
...
@@ -25,6 +25,7 @@ class RADIX_PUBLIC NavigationActionManager : public QObject
private:
class
PImpl
;
std
::
unique_ptr
<
PImpl
,
void
(
*
)(
PImpl
*
)
>
p
;
static
void
deleter
(
PImpl
*
impl
);
};
}
// namespace radix
...
...
radixwidgets/tabwidget.cc
View file @
ad788bbc
...
...
@@ -3,7 +3,6 @@
#include
<iostream>
#include
<QLabel>
#include
<QPushButton>
#include
<QTabBar>
#include
<QToolButton>
...
...
@@ -16,15 +15,15 @@ TabWidget::TabWidget(QWidget *parent)
setTabsClosable
(
true
);
//
// create a 'new tab' button
QPushButton
*
n
ewButton
=
new
QPushButton
(
"+"
,
this
);
n
ewButton
->
setObjectName
(
"tabs_new_tab_button"
);
n
ewButton
->
setToolTip
(
"Add new tab"
);
n
ewButton
->
setMaximumWidth
(
25
);
mN
ewButton
=
new
QPushButton
(
"+"
,
this
);
mN
ewButton
->
setObjectName
(
"tabs_new_tab_button"
);
mN
ewButton
->
setToolTip
(
"Add new tab"
);
mN
ewButton
->
setMaximumWidth
(
25
);
addTab
(
new
QLabel
(
""
),
QString
(
""
));
QWidget
*
newTabWidget
=
widget
(
0
);
newTabWidget
->
setObjectName
(
"tabwidget_new_tab"
);
tabBar
()
->
setTabButton
(
0
,
QTabBar
::
RightSide
,
n
ewButton
);
tabBar
()
->
setTabButton
(
0
,
QTabBar
::
RightSide
,
mN
ewButton
);
// this is require on mac to hide the close button on the first tab
QWidget
*
temp
=
tabBar
()
->
tabButton
(
0
,
QTabBar
::
LeftSide
);
if
(
temp
)
temp
->
hide
();
...
...
@@ -34,7 +33,7 @@ TabWidget::TabWidget(QWidget *parent)
setCurrentIndex
(
-
1
);
// forward pushbutton signal
connect
(
n
ewButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SIGNAL
(
addTabRequested
()));
connect
(
mN
ewButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SIGNAL
(
addTabRequested
()));
}
}
// namespace radix
radixwidgets/tabwidget.hh
View file @
ad788bbc
#ifndef RADIX_RADIXWIDGETS_TABWIDGET_HH_
#define RADIX_RADIXWIDGETS_TABWIDGET_HH_
#include
<QPushButton>
#include
<QTabWidget>
#include
"radixcore/visibility.hh"
...
...
@@ -15,7 +16,10 @@ class RADIX_PUBLIC TabWidget : public QTabWidget
Q_OBJECT
public:
TabWidget
(
QWidget
*
parent
=
0
);
TabWidget
(
QWidget
*
parent
=
nullptr
);
private:
QPushButton
*
mNewButton
;
signals:
void
addTabRequested
();
...
...
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