WSL/SLF GitLab Repository
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
snow-models
inishell
Commits
8db3655b
Commit
8db3655b
authored
Mar 09, 2022
by
Mathias Bavay
Browse files
More fixes for Qt6 compatibility
parent
eab72a11
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/gui/SectionTab.cc
View file @
8db3655b
...
...
@@ -211,7 +211,7 @@ void SectionTab::setSectionDynamic(const QString §ion, const QDomNode &node)
*/
bool
SectionTab
::
isDynamicParent
(
const
QString
&
section
)
const
{
const
int
dyn_idx
=
dynamic_sections_
.
indexOf
(
QReg
Exp
(
section
,
Qt
::
CaseInsensitive
));
const
int
dyn_idx
=
dynamic_sections_
.
indexOf
(
QReg
ularExpression
(
section
,
QRegularExpression
::
CaseInsensitive
Option
));
return
(
dyn_idx
!=
-
1
);
}
...
...
@@ -288,7 +288,7 @@ QString SectionTab::getParentOf(const QString §ion)
void
SectionTab
::
spawnDynamicSection
(
const
QString
&
section
,
const
QString
&
new_tab_name
)
{
int
index
=
getIndex
(
section
,
Qt
::
CaseInsensitive
);
const
int
dyn_idx
=
dynamic_sections_
.
indexOf
(
QReg
Exp
(
section
,
Qt
::
CaseInsensitive
));
const
int
dyn_idx
=
dynamic_sections_
.
indexOf
(
QReg
ularExpression
(
section
,
QRegularExpression
::
CaseInsensitive
Option
));
bool
found
=
false
;
for
(
int
ii
=
index
+
1
;
ii
<
this
->
count
();
++
ii
)
{
...
...
src/main/SyntaxHighlighter.cc
View file @
8db3655b
...
...
@@ -80,7 +80,7 @@ INISyntaxHighlighter::INISyntaxHighlighter(QTextDocument *textdoc) : QSyntaxHigh
rule
.
pattern
=
QRegularExpression
(
"
\\
"
+
Cst
::
section_open
+
section
+
"
\\
"
+
Cst
::
section_close
,
QRegularExpression
::
CaseInsensitiveOption
);
//TODO: escape only if needed for the set char
rule
.
format
=
format_known_section
;
if
(
added_sections_
.
indexOf
(
QReg
Exp
(
section
,
Qt
::
CaseInsensitive
))
==
-
1
)
{
if
(
added_sections_
.
indexOf
(
QReg
ularExpression
(
section
,
QRegularExpression
::
CaseInsensitive
Option
))
==
-
1
)
{
rules_
.
append
(
rule
);
added_sections_
.
append
(
section
);
}
...
...
src/main/inishell.cc
View file @
8db3655b
...
...
@@ -231,7 +231,7 @@ bool parseAvailableSections(const QDomElement ¤t_element, const QString &p
}
}
if
(
!
parent_section
.
isNull
())
{
//not at top level - the parent is fixed
if
(
!
section_list
.
isEmpty
()
&&
(
section_list
.
indexOf
(
QReg
Exp
(
parent_section
,
Q
t
::
CaseInsensitive
))
==
-
1
))
if
(
!
section_list
.
isEmpty
()
&&
(
section_list
.
indexOf
(
QReg
ularExpression
(
parent_section
,
Q
RegularExpression
::
CaseInsensitive
Option
))
==
-
1
))
return
false
;
//sections are given, but they don't match the parent
section_list
.
clear
();
//don't build multiple times
section_list
.
push_back
(
parent_section
);
...
...
src/panels/Checklist.cc
View file @
8db3655b
...
...
@@ -220,7 +220,7 @@ void Checklist::onPropertySet()
const
QString
values
(
this
->
property
(
"ini_value"
).
toString
()
);
if
(
ini_value_
==
values
)
return
;
const
QStringList
value_list
(
values
.
split
(
QReg
Exp
(
"
\\
s+"
),
Qt
::
SkipEmptyParts
)
);
const
QStringList
value_list
(
values
.
split
(
QReg
ularExpression
(
"
\\
s+"
),
Qt
::
SkipEmptyParts
)
);
/* clear the list, overwriting current settings */
for
(
int
ii
=
0
;
ii
<
list_
->
count
();
++
ii
)
{
...
...
src/panels/Choice.cc
View file @
8db3655b
...
...
@@ -212,7 +212,7 @@ void Choice::onPropertySet()
const
QString
values
(
this
->
property
(
"ini_value"
).
toString
()
);
if
(
ini_value_
==
values
)
return
;
const
QStringList
value_list
(
values
.
split
(
QReg
Exp
(
"
\\
s+"
),
Qt
::
SkipEmptyParts
)
);
const
QStringList
value_list
(
values
.
split
(
QReg
ularExpression
(
"
\\
s+"
),
Qt
::
SkipEmptyParts
)
);
if
(
checkbox_container_
->
count
()
==
1
)
{
topLog
(
QString
(
tr
(
R"(XML error: No checkable options set for Choice panel "%1::%2".)"
).
arg
(
...
...
src/panels/Number.cc
View file @
8db3655b
...
...
@@ -342,7 +342,7 @@ void Number::setOptions(const QDomNode &options)
*/
int
Number
::
getPrecisionOfNumber
(
const
QString
&
str_number
)
const
{
const
QStringList
dec
(
str_number
.
split
(
QReg
Exp
(
"[,.]"
))
);
const
QStringList
dec
(
str_number
.
split
(
QReg
ularExpression
(
"[,.]"
))
);
if
(
dec
.
size
()
>
1
)
//there's a decimal sign
return
dec
.
at
(
1
).
length
();
return
0
;
//integer
...
...
src/panels/Replicator.cc
View file @
8db3655b
...
...
@@ -104,10 +104,10 @@ bool Replicator::canSpawnPanel(const QString &key)
//freely replicate child items (which do not have to be tied to a Replicator's key).
//In this case of a Replicator that is not tied to any INI structure (like a frame),
//we check the list of potential child panels for a matching entry:
ok
=
child_panel_keys_
.
indexOf
(
QReg
Exp
(
key_sub
,
Qt
::
CaseInsensitive
))
!=
-
1
;
ok
=
child_panel_keys_
.
indexOf
(
QReg
ularExpression
(
key_sub
,
QRegularExpression
::
CaseInsensitive
Option
))
!=
-
1
;
if
(
!
ok
)
{
const
QString
key_sub_multi
=
getRepName
(
key
,
false
);
//TA::FILTER1::ARG1 --> TA::FILTER1::ARG#
ok
=
child_panel_keys_
.
indexOf
(
QReg
Exp
(
key_sub_multi
,
Q
t
::
CaseInsensitive
))
!=
-
1
;
ok
=
child_panel_keys_
.
indexOf
(
QReg
ularExpression
(
key_sub_multi
,
Q
RegularExpression
::
CaseInsensitive
Option
))
!=
-
1
;
}
}
return
ok
;
//otherwise, the Replicator for sure can not create this panel
...
...
src/panels/Textfield.cc
View file @
8db3655b
...
...
@@ -219,8 +219,8 @@ void Textfield::onValidButtonClicked() //for now this button only pops up for co
QString
lon
(
coord_match
.
captured
(
idx_lon_dms
)
);
const
QChar
latchar
=
lat
.
section
(
'd'
,
1
,
1
).
toDouble
()
<
0
?
'S'
:
'N'
;
const
QChar
lonchar
=
lon
.
section
(
'd'
,
1
,
1
).
toDouble
()
<
0
?
'W'
:
'E'
;
lat
.
remove
(
QReg
Exp
(
" |
\"
"
));
lat
.
replace
(
QReg
Exp
(
"d|'"
),
"_"
);
lon
.
remove
(
QReg
Exp
(
" |
\"
"
));
lon
.
replace
(
QReg
Exp
(
"d|'"
),
"_"
);
lat
.
remove
(
QReg
ularExpression
(
" |
\"
"
));
lat
.
replace
(
QReg
ularExpression
(
"d|'"
),
"_"
);
lon
.
remove
(
QReg
ularExpression
(
" |
\"
"
));
lon
.
replace
(
QReg
ularExpression
(
"d|'"
),
"_"
);
url
+=
lat
+
"_"
+
latchar
+
"_"
;
url
+=
lon
+
"_"
+
lonchar
;
...
...
Write
Preview
Supports
Markdown
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