Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Cantor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
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
Education
Cantor
Commits
45322d9f
Unverified
Commit
45322d9f
authored
Feb 11, 2017
by
Andreas Sturmlechner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[julia] Fix build with -fno-operator-names
REVIEW: 129942
parent
4b8ef6be
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
18 deletions
+18
-18
src/backends/julia/juliaexpression.cpp
src/backends/julia/juliaexpression.cpp
+3
-3
src/backends/julia/juliaextensions.cpp
src/backends/julia/juliaextensions.cpp
+2
-2
src/backends/julia/juliahighlighter.cpp
src/backends/julia/juliahighlighter.cpp
+2
-2
src/backends/julia/juliakeywords.cpp
src/backends/julia/juliakeywords.cpp
+5
-5
src/backends/julia/juliaserver/juliaserver.cpp
src/backends/julia/juliaserver/juliaserver.cpp
+2
-2
src/backends/julia/juliaserver/main.cpp
src/backends/julia/juliaserver/main.cpp
+2
-2
src/backends/julia/juliasession.cpp
src/backends/julia/juliasession.cpp
+2
-2
No files found.
src/backends/julia/juliaexpression.cpp
View file @
45322d9f
...
...
@@ -40,7 +40,7 @@ void JuliaExpression::evaluate()
// Plots integration
m_plot_filename
.
clear
();
if
(
juliaSession
->
integratePlots
()
and
checkPlotShowingCommands
())
{
if
(
juliaSession
->
integratePlots
()
&&
checkPlotShowingCommands
())
{
// Simply add plot saving command to the end of execution
QStringList
inlinePlotFormats
;
inlinePlotFormats
<<
QLatin1String
(
"svg"
);
...
...
@@ -73,8 +73,8 @@ void JuliaExpression::finalize()
setResult
(
new
Cantor
::
TextResult
(
juliaSession
->
getOutput
()));
setStatus
(
Cantor
::
Expression
::
Error
);
}
else
{
if
(
not
m_plot_filename
.
isEmpty
()
and
QFileInfo
(
m_plot_filename
).
exists
())
{
if
(
!
m_plot_filename
.
isEmpty
()
&&
QFileInfo
(
m_plot_filename
).
exists
())
{
// If we have plot in result, show it
setResult
(
new
Cantor
::
ImageResult
(
QUrl
::
fromLocalFile
(
m_plot_filename
)));
...
...
src/backends/julia/juliaextensions.cpp
View file @
45322d9f
...
...
@@ -138,7 +138,7 @@ QString JuliaPlotExtension::plotFunction2d(
{
auto
new_left
=
left
;
auto
new_right
=
right
;
if
(
new_left
.
isEmpty
()
and
new_right
.
isEmpty
())
{
if
(
new_left
.
isEmpty
()
&&
new_right
.
isEmpty
())
{
new_left
=
QLatin1String
(
"-1"
);
new_right
=
QLatin1String
(
"1"
);
}
else
if
(
new_left
.
isEmpty
())
{
...
...
@@ -165,7 +165,7 @@ QString JuliaPlotExtension::plotFunction3d(
{
auto
update_interval
=
[](
Interval
&
interval
)
{
if
(
interval
.
first
.
isEmpty
()
and
interval
.
second
.
isEmpty
())
{
if
(
interval
.
first
.
isEmpty
()
&&
interval
.
second
.
isEmpty
())
{
interval
.
first
=
QLatin1String
(
"-1"
);
interval
.
second
=
QLatin1String
(
"1"
);
}
else
if
(
interval
.
first
.
isEmpty
())
{
...
...
src/backends/julia/juliahighlighter.cpp
View file @
45322d9f
...
...
@@ -98,7 +98,7 @@ void JuliaHighlighter::highlightBlock(const QString &text)
while
(
pos
<
text
.
length
())
{
// Trying to close current environments
bool
triggered
=
false
;
for
(
int
i
=
0
;
i
<
flags
.
size
()
and
not
triggered
;
i
++
)
{
for
(
int
i
=
0
;
i
<
flags
.
size
()
&&
!
triggered
;
i
++
)
{
int
flag
=
flags
[
i
];
QRegExp
&
regexp
=
regexps_ends
[
i
];
QTextCharFormat
&
format
=
formats
[
i
];
...
...
@@ -144,7 +144,7 @@ void JuliaHighlighter::highlightBlock(const QString &text)
singleLineCommentStart
.
indexIn
(
text
,
pos
);
if
(
singleLineCommentStartPos
!=
-
1
and
singleLineCommentStartPos
<
minPos
)
{
&&
singleLineCommentStartPos
<
minPos
)
{
// single line comment starts earlier
setFormat
(
pos
,
text
.
length
()
-
pos
,
commentFormat
());
break
;
...
...
src/backends/julia/juliakeywords.cpp
View file @
45322d9f
...
...
@@ -62,11 +62,11 @@ void JuliaKeywords::loadFromFile()
const
QStringRef
name
=
xml
.
name
();
if
(
name
==
QLatin1String
(
"keywords"
)
or
name
==
QLatin1String
(
"variables"
)
or
name
==
QLatin1String
(
"plot_showing_commands"
))
{
||
name
==
QLatin1String
(
"variables"
)
||
name
==
QLatin1String
(
"plot_showing_commands"
))
{
while
(
xml
.
readNextStartElement
())
{
Q_ASSERT
(
xml
.
isStartElement
()
and
xml
.
name
()
==
QLatin1String
(
"word"
)
xml
.
isStartElement
()
&&
xml
.
name
()
==
QLatin1String
(
"word"
)
);
const
QString
text
=
xml
.
readElementText
();
...
...
@@ -91,7 +91,7 @@ void JuliaKeywords::loadFromFile()
void
JuliaKeywords
::
addVariable
(
const
QString
&
variable
)
{
if
(
not
m_variables
.
contains
(
variable
))
{
if
(
!
m_variables
.
contains
(
variable
))
{
m_variables
<<
variable
;
}
}
...
...
@@ -104,7 +104,7 @@ void JuliaKeywords::clearVariables()
void
JuliaKeywords
::
addFunction
(
const
QString
&
function
)
{
if
(
not
m_functions
.
contains
(
function
))
{
if
(
!
m_functions
.
contains
(
function
))
{
m_functions
<<
function
;
}
}
...
...
src/backends/julia/juliaserver/juliaserver.cpp
View file @
45322d9f
...
...
@@ -47,7 +47,7 @@ void JuliaServer::runJuliaCommand(const QString &command)
{
// Redirect stdout, stderr to temprorary files
QTemporaryFile
output
,
error
;
if
(
not
output
.
open
()
or
not
error
.
open
())
{
if
(
!
output
.
open
()
||
!
error
.
open
())
{
qFatal
(
"Unable to create temprorary files for stdout/stderr"
);
return
;
}
...
...
@@ -90,7 +90,7 @@ void JuliaServer::runJuliaCommand(const QString &command)
bool
is_nothing
=
jl_unbox_bool
(
static_cast
<
jl_value_t
*>
(
jl_call2
(
equality
,
nothing
,
val
))
);
if
(
not
is_nothing
)
{
if
(
!
is_nothing
)
{
jl_static_show
(
JL_STDOUT
,
val
);
}
m_was_exception
=
false
;
...
...
src/backends/julia/juliaserver/main.cpp
View file @
45322d9f
...
...
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
{
QCoreApplication
app
(
argc
,
argv
);
if
(
not
QDBusConnection
::
sessionBus
().
isConnected
())
{
if
(
!
QDBusConnection
::
sessionBus
().
isConnected
())
{
qWarning
()
<<
"Can't connect to the D-Bus session bus.
\n
"
"To start it, run: eval `dbus-launch --auto-syntax`"
;
return
1
;
...
...
@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
const
QString
&
serviceName
=
QString
::
fromLatin1
(
"org.kde.Cantor.Julia-%1"
).
arg
(
app
.
applicationPid
());
if
(
not
QDBusConnection
::
sessionBus
().
registerService
(
serviceName
))
{
if
(
!
QDBusConnection
::
sessionBus
().
registerService
(
serviceName
))
{
qWarning
()
<<
QDBusConnection
::
sessionBus
().
lastError
().
message
();
return
2
;
}
...
...
src/backends/julia/juliasession.cpp
View file @
45322d9f
...
...
@@ -86,7 +86,7 @@ void JuliaSession::login()
QDBusConnection
::
sessionBus
()
);
if
(
not
m_interface
->
isValid
())
{
if
(
!
m_interface
->
isValid
())
{
qWarning
()
<<
QDBusConnection
::
sessionBus
().
lastError
().
message
();
return
;
}
...
...
@@ -213,7 +213,7 @@ bool JuliaSession::getWasException()
{
const
QDBusReply
<
bool
>
&
reply
=
m_interface
->
call
(
QLatin1String
(
"getWasException"
));
return
reply
.
isValid
()
and
reply
.
value
();
return
reply
.
isValid
()
&&
reply
.
value
();
}
void
JuliaSession
::
listVariables
()
...
...
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