Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
0ce59d1a
Commit
0ce59d1a
authored
Jul 31, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced .toLocal8Bit().data() with qPrintable()
parent
0b796438
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
74 additions
and
102 deletions
+74
-102
profibus/lib/cow/qt/cow_pb_gsd_attr_qt.cqt
profibus/lib/cow/qt/cow_pb_gsd_attr_qt.cqt
+1
-2
profibus/lib/cow/qt/cow_pn_gsdml_attr_qt.cqt
profibus/lib/cow/qt/cow_pn_gsdml_attr_qt.cqt
+1
-2
profibus/lib/cow/src/cow_pb_gsd_attrnav.cpp
profibus/lib/cow/src/cow_pb_gsd_attrnav.cpp
+2
-2
profibus/lib/cow/src/cow_pb_gsd_attrnav.h
profibus/lib/cow/src/cow_pb_gsd_attrnav.h
+2
-2
profibus/lib/cow/src/cow_pn_gsdml.cpp
profibus/lib/cow/src/cow_pn_gsdml.cpp
+1
-1
profibus/lib/cow/src/cow_pn_gsdml.h
profibus/lib/cow/src/cow_pn_gsdml.h
+1
-1
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
+4
-4
profibus/lib/cow/src/cow_pn_gsdml_attrnav.h
profibus/lib/cow/src/cow_pn_gsdml_attrnav.h
+5
-5
wb/lib/wb/gtk/wb_uted_gtk.cpp
wb/lib/wb/gtk/wb_uted_gtk.cpp
+1
-1
wb/lib/wb/gtk/wb_uted_gtk.h
wb/lib/wb/gtk/wb_uted_gtk.h
+1
-1
wb/lib/wb/motif/wb_uted_motif.cpp
wb/lib/wb/motif/wb_uted_motif.cpp
+1
-1
wb/lib/wb/motif/wb_uted_motif.h
wb/lib/wb/motif/wb_uted_motif.h
+1
-1
wb/lib/wb/qt/wb_foe_qt.cqt
wb/lib/wb/qt/wb_foe_qt.cqt
+3
-5
wb/lib/wb/qt/wb_uted_qt.cqt
wb/lib/wb/qt/wb_uted_qt.cqt
+2
-3
wb/lib/wb/qt/wb_uted_qt.h
wb/lib/wb/qt/wb_uted_qt.h
+1
-1
wb/lib/wb/qt/wb_vsel_qt.cqt
wb/lib/wb/qt/wb_vsel_qt.cqt
+1
-2
wb/lib/wb/src/wb_uted.cpp
wb/lib/wb/src/wb_uted.cpp
+1
-1
wb/lib/wb/src/wb_uted.h
wb/lib/wb/src/wb_uted.h
+2
-2
xtt/exe/rt_xtt/qt/rt_xtt_qt.cqt
xtt/exe/rt_xtt/qt/rt_xtt_qt.cqt
+1
-2
xtt/lib/cow/qt/cow_login_qt.cqt
xtt/lib/cow/qt/cow_login_qt.cqt
+2
-4
xtt/lib/cow/qt/cow_msgwindow_qt.cqt
xtt/lib/cow/qt/cow_msgwindow_qt.cqt
+1
-2
xtt/lib/cow/qt/cow_qt_helpers.cpp
xtt/lib/cow/qt/cow_qt_helpers.cpp
+1
-3
xtt/lib/cow/qt/cow_wow_qt.cqt
xtt/lib/cow/qt/cow_wow_qt.cqt
+2
-4
xtt/lib/cow/qt/cow_xhelp_qt.cqt
xtt/lib/cow/qt/cow_xhelp_qt.cqt
+1
-2
xtt/lib/ge/qt/ge_curve_qt.cqt
xtt/lib/ge/qt/ge_curve_qt.cqt
+9
-13
xtt/lib/ge/qt/ge_item_view_qt.cqt
xtt/lib/ge/qt/ge_item_view_qt.cqt
+8
-12
xtt/lib/ge/qt/ge_item_view_qt.h
xtt/lib/ge/qt/ge_item_view_qt.h
+1
-1
xtt/lib/ge/qt/ge_qt.cqt
xtt/lib/ge/qt/ge_qt.cqt
+2
-2
xtt/lib/ge/src/ge.cpp
xtt/lib/ge/src/ge.cpp
+1
-1
xtt/lib/ge/src/ge.h
xtt/lib/ge/src/ge.h
+1
-1
xtt/lib/xtt/qt/xtt_clog_qt.cqt
xtt/lib/xtt/qt/xtt_clog_qt.cqt
+2
-4
xtt/lib/xtt/qt/xtt_stream_qt.cqt
xtt/lib/xtt/qt/xtt_stream_qt.cqt
+9
-12
xtt/lib/xtt/src/xtt_clognav.cpp
xtt/lib/xtt/src/xtt_clognav.cpp
+1
-1
xtt/lib/xtt/src/xtt_clognav.h
xtt/lib/xtt/src/xtt_clognav.h
+1
-1
No files found.
profibus/lib/cow/qt/cow_pb_gsd_attr_qt.cqt
View file @
0ce59d1a
...
...
@@ -182,8 +182,7 @@ void GsdAttrQtWidget::activate_cmd_input()
attr->attrnav->set_inputfocus();
if (attr->input_open) {
QByteArray text = attr->cmd_input->text().toLocal8Bit();
attr->attrnav->set_attr_value(text.data());
attr->attrnav->set_attr_value(qPrintable(attr->cmd_input->text()));
attr->cmd_input->setVisible(false);
attr->set_prompt("");
attr->input_open = 0;
...
...
profibus/lib/cow/qt/cow_pn_gsdml_attr_qt.cqt
View file @
0ce59d1a
...
...
@@ -221,8 +221,7 @@ void GsdmlAttrQtWidget::activate_cmd_entry()
attr->attrnav->set_inputfocus();
if (attr->input_open) {
QByteArray text = attr->cmd_entry->text().toLocal8Bit();
attr->attrnav->set_attr_value(text.data());
attr->attrnav->set_attr_value(qPrintable(attr->cmd_entry->text()));
attr->cmd_entry->setVisible(false);
attr->set_prompt("");
attr->input_open = 0;
...
...
profibus/lib/cow/src/cow_pb_gsd_attrnav.cpp
View file @
0ce59d1a
...
...
@@ -113,7 +113,7 @@ static char null_str[] = "";
//
// Convert attribute string to value
//
int
GsdAttrNav
::
attr_string_to_value
(
int
type_id
,
char
*
value_str
,
int
GsdAttrNav
::
attr_string_to_value
(
int
type_id
,
c
onst
c
har
*
value_str
,
void
*
buffer_ptr
,
int
buff_size
,
int
attr_size
)
{
switch
(
type_id
)
{
...
...
@@ -485,7 +485,7 @@ int GsdAttrNav::get_select(ItemPb** item)
//
// Set attribute value
//
int
GsdAttrNav
::
set_attr_value
(
char
*
value_str
)
int
GsdAttrNav
::
set_attr_value
(
c
onst
c
har
*
value_str
)
{
brow_tNode
*
node_list
;
int
node_count
;
...
...
profibus/lib/cow/src/cow_pb_gsd_attrnav.h
View file @
0ce59d1a
...
...
@@ -123,7 +123,7 @@ public:
}
void
start_trace
(
pwr_tObjid
Objid
,
char
*
object_str
);
int
set_attr_value
(
char
*
value_str
);
int
set_attr_value
(
c
onst
c
har
*
value_str
);
int
check_attr_value
(
char
**
value
);
int
get_select
(
pwr_sAttrRef
*
attrref
,
int
*
is_attr
);
void
message
(
char
sev
,
const
char
*
text
);
...
...
@@ -143,7 +143,7 @@ public:
flow_eTraceType
type
,
void
**
p
);
static
int
trace_disconnect_bc
(
brow_tObject
object
);
static
int
init_brow_cb
(
FlowCtx
*
fctx
,
void
*
client_data
);
static
int
attr_string_to_value
(
int
type_id
,
char
*
value_str
,
static
int
attr_string_to_value
(
int
type_id
,
c
onst
c
har
*
value_str
,
void
*
buffer_ptr
,
int
buff_size
,
int
attr_size
);
static
void
attrvalue_to_string
(
int
type_id
,
void
*
value_ptr
,
char
*
str
,
int
size
,
int
*
len
,
char
*
format
);
...
...
profibus/lib/cow/src/cow_pn_gsdml.cpp
View file @
0ce59d1a
...
...
@@ -2254,7 +2254,7 @@ int pn_gsdml::datavalue_to_string(gsdml_eValueDataType datatype, void* value,
}
int
pn_gsdml
::
string_to_datavalue
(
gsdml_eValueDataType
datatype
,
void
*
value
,
unsigned
int
size
,
char
*
str
)
gsdml_eValueDataType
datatype
,
void
*
value
,
unsigned
int
size
,
c
onst
c
har
*
str
)
{
switch
(
datatype
)
{
case
gsdml_eValueDataType_Integer8
:
...
...
profibus/lib/cow/src/cow_pn_gsdml.h
View file @
0ce59d1a
...
...
@@ -1569,7 +1569,7 @@ public:
int
datavalue_to_string
(
gsdml_eValueDataType
datatype
,
void
*
value
,
unsigned
int
size
,
char
*
str
,
unsigned
int
strsize
);
int
string_to_datavalue
(
gsdml_eValueDataType
datatype
,
void
*
value
,
unsigned
int
size
,
char
*
str
);
gsdml_eValueDataType
datatype
,
void
*
value
,
unsigned
int
size
,
c
onst
c
har
*
str
);
int
get_datavalue_length
(
gsdml_eValueDataType
datatype
,
int
strlength
,
unsigned
int
*
len
);
void
set_classes
(
gsdml_sModuleClass
*
mclist
)
...
...
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
View file @
0ce59d1a
...
...
@@ -112,7 +112,7 @@ static char null_str[] = "";
//
// Convert attribute string to value
//
int
GsdmlAttrNav
::
attr_string_to_value
(
int
type_id
,
char
*
value_str
,
int
GsdmlAttrNav
::
attr_string_to_value
(
int
type_id
,
c
onst
c
har
*
value_str
,
void
*
buffer_ptr
,
int
buff_size
,
int
attr_size
)
{
switch
(
type_id
)
{
...
...
@@ -577,7 +577,7 @@ int GsdmlAttrNav::get_select(ItemPn** item)
//
// Set attribute value
//
int
GsdmlAttrNav
::
set_attr_value
(
char
*
value_str
)
int
GsdmlAttrNav
::
set_attr_value
(
c
onst
c
har
*
value_str
)
{
brow_tNode
*
node_list
;
int
node_count
;
...
...
@@ -1961,7 +1961,7 @@ int ItemPnBase::scan(GsdmlAttrNav* attrnav, void* p)
return
1
;
}
void
ItemPnBase
::
value_changed
(
GsdmlAttrNav
*
attrnav
,
char
*
value_str
)
void
ItemPnBase
::
value_changed
(
GsdmlAttrNav
*
attrnav
,
c
onst
c
har
*
value_str
)
{
char
buffer
[
1024
];
int
sts
;
...
...
@@ -4001,7 +4001,7 @@ int ItemPnParValue::scan(GsdmlAttrNav* attrnav, void* p)
return
1
;
}
void
ItemPnParValue
::
value_changed
(
GsdmlAttrNav
*
attrnav
,
char
*
value_str
)
void
ItemPnParValue
::
value_changed
(
GsdmlAttrNav
*
attrnav
,
c
onst
c
har
*
value_str
)
{
int
sts
;
...
...
profibus/lib/cow/src/cow_pn_gsdml_attrnav.h
View file @
0ce59d1a
...
...
@@ -157,7 +157,7 @@ public:
}
void
start_trace
(
pwr_tObjid
Objid
,
char
*
object_str
);
int
set_attr_value
(
char
*
value_str
);
int
set_attr_value
(
c
onst
c
har
*
value_str
);
int
check_attr_value
(
char
**
value
);
int
get_select
(
pwr_sAttrRef
*
attrref
,
int
*
is_attr
);
void
message
(
char
sev
,
const
char
*
text
);
...
...
@@ -198,7 +198,7 @@ public:
flow_eTraceType
type
,
void
**
p
);
static
int
trace_disconnect_bc
(
brow_tObject
object
);
static
int
init_brow_cb
(
FlowCtx
*
fctx
,
void
*
client_data
);
static
int
attr_string_to_value
(
int
type_id
,
char
*
value_str
,
static
int
attr_string_to_value
(
int
type_id
,
c
onst
c
har
*
value_str
,
void
*
buffer_ptr
,
int
buff_size
,
int
attr_size
);
static
void
attrvalue_to_string
(
int
type_id
,
void
*
value_ptr
,
char
*
str
,
int
size
,
int
*
len
,
char
*
format
);
...
...
@@ -239,7 +239,7 @@ public:
virtual
void
update
(
GsdmlAttrNav
*
attrnav
)
{
}
virtual
void
value_changed
(
GsdmlAttrNav
*
attrnav
,
char
*
value_str
)
virtual
void
value_changed
(
GsdmlAttrNav
*
attrnav
,
c
onst
c
har
*
value_str
)
{
}
};
...
...
@@ -262,7 +262,7 @@ public:
int
subgraph
;
virtual
int
scan
(
GsdmlAttrNav
*
attrnav
,
void
*
p
);
virtual
void
value_changed
(
GsdmlAttrNav
*
attrnav
,
char
*
value_str
);
virtual
void
value_changed
(
GsdmlAttrNav
*
attrnav
,
c
onst
c
har
*
value_str
);
};
//! Item for an enum attribute.
...
...
@@ -524,7 +524,7 @@ public:
int
noedit
;
int
scan
(
GsdmlAttrNav
*
attrnav
,
void
*
p
);
void
value_changed
(
GsdmlAttrNav
*
attrnav
,
char
*
value_str
);
void
value_changed
(
GsdmlAttrNav
*
attrnav
,
c
onst
c
har
*
value_str
);
};
class
ParEnumValue
{
...
...
wb/lib/wb/gtk/wb_uted_gtk.cpp
View file @
0ce59d1a
...
...
@@ -591,7 +591,7 @@ void WUtedGtk::set_command_window(char* cmd)
{
}
void
WUtedGtk
::
configure_quals
(
char
*
label
)
void
WUtedGtk
::
configure_quals
(
c
onst
c
har
*
label
)
{
int
i
;
int
index
;
...
...
wb/lib/wb/gtk/wb_uted_gtk.h
View file @
0ce59d1a
...
...
@@ -83,7 +83,7 @@ public:
void
raise_window
();
void
clock_cursor
();
void
reset_cursor
();
void
configure_quals
(
char
*
label
);
void
configure_quals
(
c
onst
c
har
*
label
);
void
enable_entries
(
int
enable
);
void
get_value
(
int
idx
,
char
*
str
,
int
len
);
void
questionbox
(
char
*
question_title
,
char
*
question_text
,
...
...
wb/lib/wb/motif/wb_uted_motif.cpp
View file @
0ce59d1a
...
...
@@ -907,7 +907,7 @@ void WUtedMotif::set_command_window(char* cmd)
XmStringFree
(
cstr
);
}
void
WUtedMotif
::
configure_quals
(
char
*
label
)
void
WUtedMotif
::
configure_quals
(
c
onst
c
har
*
label
)
{
Arg
arg
[
1
];
Arg
args
[
1
];
...
...
wb/lib/wb/motif/wb_uted_motif.h
View file @
0ce59d1a
...
...
@@ -81,7 +81,7 @@ public:
void
raise_window
();
void
clock_cursor
();
void
reset_cursor
();
void
configure_quals
(
char
*
label
);
void
configure_quals
(
c
onst
c
har
*
label
);
void
enable_entries
(
int
enable
);
void
get_value
(
int
idx
,
char
*
str
,
int
len
);
void
questionbox
(
char
*
question_title
,
char
*
question_text
,
...
...
wb/lib/wb/qt/wb_foe_qt.cqt
View file @
0ce59d1a
...
...
@@ -523,8 +523,7 @@ int WFoeQt::modify_popup(unsigned long popupmenu_mask, int x, int y)
QMenu* menu = new QMenu(toplevel);
for (int i = 0; i < bsize; i++) {
if (popupmenu_mask & (1 << i)) {
QByteArray ba = menu_callbacks[i].toLocal8Bit();
addMenuItem(toplevel, menu, buttontext[i], ba.data());
addMenuItem(toplevel, menu, buttontext[i], qPrintable(menu_callbacks[i]));
}
}
...
...
@@ -922,9 +921,8 @@ pwr_tStatus WFoeQt::create_window(int x_top, int y_top, int width_adb,
for (int i = 0; i < 5; i++) {
double num = pow(2, i) / (16 * 5);
QString txt = QString::number(i + 1).prepend('_');
QByteArray ba = txt.toLocal8Bit();
QAction* view_gs_t = addMenuRadioItem(
toplevel, view_gs, ba.data(), SLOT(activate_gridsize()), view_gs_group);
QAction* view_gs_t = addMenuRadioItem(toplevel, view_gs, qPrintable(txt),
SLOT(activate_gridsize()), view_gs_group);
view_gs_t->setData(num);
}
...
...
wb/lib/wb/qt/wb_uted_qt.cqt
View file @
0ce59d1a
...
...
@@ -82,8 +82,7 @@ void WUtedQtWidget::activate_command()
for (int j = 0; uted->optmenubuttons[j]; j++) {
if (sender() == uted->optmenubuttons[j]) {
QByteArray label = uted->optmenubuttons[j]->text().toLocal8Bit();
uted->configure_quals(label.data());
uted->configure_quals(qPrintable(uted->optmenubuttons[j]->text()));
}
}
}
...
...
@@ -347,7 +346,7 @@ void WUtedQt::set_command_window(char* cmd)
{
}
void WUtedQt::configure_quals(char* label)
void WUtedQt::configure_quals(c
onst c
har* label)
{
int i;
int index;
...
...
wb/lib/wb/qt/wb_uted_qt.h
View file @
0ce59d1a
...
...
@@ -80,7 +80,7 @@ public:
void
raise_window
();
void
clock_cursor
();
void
reset_cursor
();
void
configure_quals
(
char
*
label
);
void
configure_quals
(
c
onst
c
har
*
label
);
void
enable_entries
(
int
enable
);
void
get_value
(
int
idx
,
char
*
str
,
int
len
);
void
questionbox
(
char
*
question_title
,
char
*
question_text
,
...
...
wb/lib/wb/qt/wb_vsel_qt.cqt
View file @
0ce59d1a
...
...
@@ -77,8 +77,7 @@ void WVselQtWidget::activate_ok()
char selected_text[80];
QList<QTreeWidgetItem*> selection = sel->volumelist->selectedItems();
if (selection.size() > 0) {
QByteArray text = selection[0]->text(0).toLocal8Bit();
strcpy(selected_text, text.data());
strcpy(selected_text, qPrintable(selection[0]->text(0)));
}
pwr_tVid vid;
...
...
wb/lib/wb/src/wb_uted.cpp
View file @
0ce59d1a
...
...
@@ -437,7 +437,7 @@ int WUted::execute(int show)
return
FOE__SUCCESS
;
}
pwr_tStatus
WUted
::
get_command_index
(
char
*
label
,
int
*
index
)
pwr_tStatus
WUted
::
get_command_index
(
c
onst
c
har
*
label
,
int
*
index
)
{
uted_sCommand
*
command_ptr
;
int
i
;
...
...
wb/lib/wb/src/wb_uted.h
View file @
0ce59d1a
...
...
@@ -127,7 +127,7 @@ public:
virtual
void
reset_cursor
()
{
}
virtual
void
configure_quals
(
char
*
label
)
virtual
void
configure_quals
(
c
onst
c
har
*
label
)
{
}
virtual
void
enable_entries
(
int
enable
)
...
...
@@ -146,7 +146,7 @@ public:
}
static
void
get_message_error
(
pwr_tStatus
sts
,
char
*
str
);
static
pwr_tStatus
get_command_index
(
char
*
label
,
int
*
index
);
static
pwr_tStatus
get_command_index
(
c
onst
c
har
*
label
,
int
*
index
);
static
void
get_filename
(
char
*
filename
);
};
...
...
xtt/exe/rt_xtt/qt/rt_xtt_qt.cqt
View file @
0ce59d1a
...
...
@@ -173,8 +173,7 @@ void XttQt::open_change_value()
cmd_entry->setFocus();
cmd_entry->setText("");
QByteArray ba = translate_utf8("value >").toLocal8Bit();
set_prompt(ba.data());
set_prompt(qPrintable(translate_utf8("value >")));
input_open = 1;
}
...
...
xtt/lib/cow/qt/cow_login_qt.cqt
View file @
0ce59d1a
...
...
@@ -183,12 +183,10 @@ pwr_tStatus CoLoginQt::get_values()
char user[40];
/* Get UserName */
QByteArray ba = username->text().toLocal8Bit();
strcpy(user, ba.data());
strcpy(user, qPrintable(username->text()));
/* Get Password */
ba = password->text().toLocal8Bit();
strcpy(passwd, ba.data());
strcpy(passwd, qPrintable(password->text()));
pwr_tStatus sts = user_check(groupname, user, passwd);
if (EVEN(sts)) {
...
...
xtt/lib/cow/qt/cow_msgwindow_qt.cqt
View file @
0ce59d1a
...
...
@@ -134,8 +134,7 @@ void MsgWindowQt::print()
pwr_tStatus sts;
char title[80];
QByteArray ba = translate_utf8(name).toLocal8Bit();
strncpy(title, ba.data(), sizeof(title));
strncpy(title, qPrintable(translate_utf8(name)), sizeof(title));
CoWowQt::CreateBrowPrintDialogQt(title, msgnav->brow->ctx,
flow_eOrientation_Landscape, 1.4, toplevel, &sts);
...
...
xtt/lib/cow/qt/cow_qt_helpers.cpp
View file @
0ce59d1a
...
...
@@ -87,9 +87,7 @@ void dbg_print(const char* file, int line, QString str)
file2
=
file2
?
(
file2
+
1
)
:
file
;
fprintf
(
stderr
,
" %s:%d: "
,
file2
,
line
);
// 3. print the actual debug message
QByteArray
ba
=
str
.
toLocal8Bit
();
const
char
*
c_str
=
ba
.
data
();
fprintf
(
stderr
,
"%s
\n
"
,
c_str
);
fprintf
(
stderr
,
"%s
\n
"
,
qPrintable
(
str
));
}
}
...
...
xtt/lib/cow/qt/cow_wow_qt.cqt
View file @
0ce59d1a
...
...
@@ -528,8 +528,7 @@ void CoWowQt::CreateFileSelDia(const char* title, void* parent_ctx,
object->parent_wid, fl(title), fl(folder), filter);
if (!filename.isNull()) {
QByteArray ba = filename.toLocal8Bit();
strcpy(fname, ba.data());
strcpy(fname, qPrintable(filename));
}
if (file_selected_cb) {
...
...
@@ -671,8 +670,7 @@ void CoWowEntryQt::keyPressEvent(QKeyEvent* event)
for (int i = m_re->m_recall_size - 2; i >= 0; i--) {
strcpy(m_re->m_recall[i + 1], m_re->m_recall[i]);
}
QByteArray ba = txt.toLocal8Bit();
strncpy(m_re->m_recall[0], ba.data(), m_re->m_line_size);
strncpy(m_re->m_recall[0], qPrintable(txt), m_re->m_line_size);
m_re->m_recall[0][m_re->m_line_size - 1] = 0;
}
m_re->m_current_recall_line = 0;
...
...
xtt/lib/cow/qt/cow_xhelp_qt.cqt
View file @
0ce59d1a
...
...
@@ -153,8 +153,7 @@ void CoXHelpQt::print()
pwr_tStatus sts;
char title[80];
QByteArray ba = translate_utf8("Help").toLocal8Bit();
strcpy(title, ba.data());
strcpy(title, qPrintable(translate_utf8("Help")));
CoWowQt::CreateBrowPrintDialogQt(title, xhelpnav->brow->ctx,
flow_eOrientation_Portrait, 0.7, toplevel, &sts);
...
...
xtt/lib/ge/qt/ge_curve_qt.cqt
View file @
0ce59d1a
...
...
@@ -372,16 +372,15 @@ void GeCurveQtWidget::activate_export_ok()
}
if (curve->layout_mask & curve_mEnable_ExportTime) {
QByteArray ba = curve->export_fromtime_widget->text().toLocal8Bit();
sts = time_AsciiToA(ba.data(
), &from);
sts = time_AsciiToA(
qPrintable(curve->export_fromtime_widget->text()
), &from);
if (EVEN(sts)) {
curve->wow->DisplayError("Syntax Error", "From time syntax error");
return;
}
ba = curve->export_totime_widget->text().toLocal8Bit();
sts = time_AsciiToA(ba.data(), &to);
sts = time_AsciiToA(qPrintable(curve->export_totime_widget->text()), &to);
if (EVEN(sts)) {
curve->wow->DisplayError("Syntax Error", "To time syntax error");
return;
...
...
@@ -395,8 +394,7 @@ void GeCurveQtWidget::activate_export_ok()
}
}
QByteArray ba = curve->export_filename_widget->text().toLocal8Bit();
strcpy(filename, ba.data());
strcpy(filename, qPrintable(curve->export_filename_widget->text()));
curve->export_widget->setVisible(false);
...
...
@@ -417,9 +415,9 @@ void GeCurveQtWidget::activate_export_cancel()
void GeCurveQtWidget::activate_export_browse()
{
QByteArray ba = translate_utf8("File Selection").toLocal8Bit();
curve->wow->CreateFileSelDia(ba.data(), (void*)this
,
GeCurveQt::export_file_selected_cb,
wow_eFileSelType_History);
curve->wow->CreateFileSelDia(qPrintable(translate_utf8("File Selection")),
(void*)this, GeCurveQt::export_file_selected_cb
,
wow_eFileSelType_History);
}
void GeCurveQt::export_file_selected_cb(
...
...
@@ -584,14 +582,12 @@ void GeCurveQt::set_times_sensitivity(int sensitive)
pwr_tStatus GeCurveQt::get_times(pwr_tTime* from, pwr_tTime* to)
{
QByteArray from_p = timebox_start_time->text().toLocal8Bit();
pwr_tStatus sts = time_FormAsciiToA(from_p.data(), SWE, SECOND, from);
pwr_tStatus sts = time_FormAsciiToA(qPrintable(timebox_start_time->text()), SWE, SECOND, from);
if (EVEN(sts)) {
return sts;
}
QByteArray to_p = timebox_stop_time->text().toLocal8Bit();
sts = time_FormAsciiToA(to_p.data(), SWE, SECOND, to);
sts = time_FormAsciiToA(qPrintable(timebox_stop_time->text()), SWE, SECOND, to);
if (EVEN(sts)) {
return sts;
}
...
...
xtt/lib/ge/qt/ge_item_view_qt.cqt
View file @
0ce59d1a
...
...
@@ -115,9 +115,9 @@ void GeItemViewQt::update()
}
}
void GeItemViewQt::update(char* full_name, int event)
void GeItemViewQt::update(c
onst c
har* full_name, int event)
{
char* name_p = strrchr(full_name, '/');
char* name_p =
(char *)
strrchr(full_name, '/');
full_name = strstr(name_p, ".pwg");
if (!full_name) {
return;
...
...
@@ -181,21 +181,20 @@ void GeItemViewQt::activate_menu_open()
void GeItemViewQt::activate_menu_delete()
{
QByteArray sel_text = selected_text().toLocal8Bit();
if (sel_text.data()) {
if (qPrintable(selected_text())) {
int rv;
char title[] = "Delete graph";
char message[64];
pwr_tCmd cmd;
sprintf(message, "Do you want to delete %s?",
sel_text.data(
));
sprintf(message, "Do you want to delete %s?",
qPrintable(selected_text()
));
rv = ge_ctx->create_modal_dialog(
title, message, "Yes", "Cancel", NULL, NULL);
if (rv != wow_eModalDialogReturn_Button1) {
return;
}
sprintf(cmd, "rm -f $pwrp_pop/%s.pwg",
sel_text.data(
));
sprintf(cmd, "rm -f $pwrp_pop/%s.pwg",
qPrintable(selected_text()
));
system(cmd);
}
}
...
...
@@ -268,8 +267,7 @@ void GeItemViewQt::directory_changed(const QString& path)
if (!files2.contains(files[i])) {
// File deleted
if (!files[i].contains("__p")) {
QByteArray ba = files[i].toLocal8Bit();
update(ba.data(), 1);
update(qPrintable(files[i]), 1);
}
}
}
...
...
@@ -278,8 +276,7 @@ void GeItemViewQt::directory_changed(const QString& path)
if (!files.contains(files2[i])) {
// File created
if (!files2[i].contains("__p")) {
QByteArray ba = files2[i].toLocal8Bit();
update(ba.data(), 0);
update(qPrintable(files2[i]), 0);
}
}
}
...
...
@@ -326,8 +323,7 @@ void GeItemViewQt::activate_tree_widget(QTreeWidgetItem* item, int idx)
QString sel_text = selected_text(tree_widget);
if (!sel_text.isNull()) {
QByteArray ba = sel_text.toLocal8Bit();
ge_ctx->open_graph(ba.data());
ge_ctx->open_graph(qPrintable(sel_text));
}
}
...
...
xtt/lib/ge/qt/ge_item_view_qt.h
View file @
0ce59d1a
...
...
@@ -58,7 +58,7 @@ public:
QWidget
*
widget
();
void
update
();
void
update
(
char
*
,
int
);
void
update
(
c
onst
c
har
*
,
int
);
protected:
void
focusOutEvent
(
QFocusEvent
*
event
);
...
...
xtt/lib/ge/qt/ge_qt.cqt
View file @
0ce59d1a
...
...
@@ -1508,9 +1508,9 @@ GeQt::GeQt(void* x_parent_ctx, QWidget* x_parent_widget,
= cons->addMenu(translate_utf8("Corners &Round Amount"));
for (int i = 0; i < 5; i++) {
double num = pow(2, i) / 4.0;
QByteArray ba = QString::number(num, 'f').toLocal8Bit();
QAction* cons_round_amount_t = addMenuRadioItem(toplevel, cons_round_amount,
ba.data(), SLOT(activate_round_amount()), round_amount_group);
qPrintable(QString::number(num, 'f')), SLOT(activate_round_amount()),
round_amount_group);
cons_round_amount_t->setData(num);
if (i == 1) {
cons_round_amount_t->setChecked(true);
...
...
xtt/lib/ge/src/ge.cpp
View file @
0ce59d1a
...
...
@@ -538,7 +538,7 @@ void Ge::export_gejava(Ge* gectx, char* name)
}
}
void
Ge
::
open_graph
(
char
*
name
)
void
Ge
::
open_graph
(
c
onst
c
har
*
name
)
{
pwr_tFileName
filename
;
char
graphname
[
80
];
...
...
xtt/lib/ge/src/ge.h
View file @
0ce59d1a
...
...
@@ -190,7 +190,7 @@ public:
void
save_and_close
();
void
clear_all
();
void
open_graph
(
char
*
name
);
void
open_graph
(
c
onst
c
har
*
name
);
int
set_focus
(
void
*
component
);
void
close
();
int
select_object
(
char
*
name
);
...
...
xtt/lib/xtt/qt/xtt_clog_qt.cqt
View file @
0ce59d1a
...
...
@@ -269,11 +269,9 @@ void CLogQtWidget::filter_apply_cb()
bool fatal = clog->show_fatal_w->isChecked();
bool text = clog->show_text_w->isChecked();
QByteArray str = clog->filter_string_w->text().toLocal8Bit();
clog->set_clock_cursor();
clog->clognav->set_filter(
success, info, warning, error, fatal, text, str.data(
));
clog->clognav->set_filter(
success, info, warning, error, fatal, text,
qPrintable(clog->filter_string_w->text()
));
clog->reset_cursor();
}
...
...
xtt/lib/xtt/qt/xtt_stream_qt.cqt
View file @
0ce59d1a
...
...
@@ -163,8 +163,8 @@ void XttStreamQtWidget::error_cb(Phonon::ErrorType error)
{
printf("Message %d\n", error);
/* Print error details on the screen */
QByteArray err = stream->playbin2->mediaObject()->errorString().toLocal8Bit();
printf("Error received from element: %s\n", err.data(
));
printf("Error received from element: %s\n",
qPrintable(stream->playbin2->mediaObject()->errorString()
));
if (error == Phonon::FatalError) {
stream->no_uri = 1;
...
...
@@ -505,19 +505,17 @@ XttStreamQt::XttStreamQt(QWidget* st_parent_wid, void* st_parent_ctx,
for (int i = 0; i < 10; i++) {
QString text1, text2, text3;
text1
+
= "PresetPosition[";
text1 = "PresetPosition[";
text1 += QString::number(i);
text1 += "].Description";
QByteArray ba1 = text1.toLocal8Bit();
text2 += "Preset position ";
text2 = "Preset position ";
text2 += QString::number(i + 1);
QByteArray ba2 = text2.toLocal8Bit();
text3 += "$pwr_exe/xtt_pos";
text3 = "$pwr_exe/xtt_pos";
text3 += QString::number(i + 1);
text3 += ".png";
Q
ByteArray ba3 = text3.toLocal8Bit();
QAction* a = addToolItemSpecial(tools, ba1.data(), ba2.data(
),
SLOT(activate_preset_position()), ba3.data(
));
Q
Action* a
= addToolItemSpecial(tools, qPrintable(text1), qPrintable(text2
),
SLOT(activate_preset_position()), qPrintable(text3
));
a->setData(i);
}
...
...
@@ -654,8 +652,7 @@ void XttStreamQt::create_popup_menu(int x, int y)
QString text;
text += "Position ";
text += QString::number(i + 1);
QByteArray ba = text.toLocal8Bit();
QAction* a = addMenuItem(toplevel, menu_preset_store, ba.data(),
QAction* a = addMenuItem(toplevel, menu_preset_store, qPrintable(text),
SLOT(activate_preset_store_pos()));
a->setData(i);
}
...
...
xtt/lib/xtt/src/xtt_clognav.cpp
View file @
0ce59d1a
...
...
@@ -295,7 +295,7 @@ CLogNavBrow::~CLogNavBrow()
}
void
CLogNav
::
set_filter
(
bool
success
,
bool
info
,
bool
warning
,
bool
error
,
bool
fatal
,
bool
text
,
char
*
str
)
bool
fatal
,
bool
text
,
c
onst
c
har
*
str
)
{
filter
.
show_success
=
success
;
filter
.
show_info
=
info
;
...
...
xtt/lib/xtt/src/xtt_clognav.h
View file @
0ce59d1a
...
...
@@ -148,7 +148,7 @@ public:
void
reset_nodraw
();
void
read
(
int
*
idx_list
,
int
idx_cnt
);
void
set_filter
(
bool
success
,
bool
info
,
bool
warning
,
bool
error
,
bool
fatal
,
bool
text
,
char
*
str
);
bool
text
,
c
onst
c
har
*
str
);
void
get_filter
(
bool
*
success
,
bool
*
info
,
bool
*
warning
,
bool
*
error
,
bool
*
fatal
,
bool
*
text
);
void
draw
();
...
...
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