Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
vite
Commits
cdb0d249
Commit
cdb0d249
authored
16 years ago
by
Jule Marcoueille
Browse files
Options
Downloads
Patches
Plain Diff
Portalibilisation du multifenetrage retravaillée pour utiliser des string.
parent
960430bf
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/interface/interface_console.cpp
+4
-10
4 additions, 10 deletions
src/interface/interface_console.cpp
src/interface/interface_console.hpp
+2
-8
2 additions, 8 deletions
src/interface/interface_console.hpp
src/interface/interface_graphic.cpp
+9
-9
9 additions, 9 deletions
src/interface/interface_graphic.cpp
with
15 additions
and
27 deletions
src/interface/interface_console.cpp
+
4
−
10
View file @
cdb0d249
...
@@ -31,14 +31,8 @@ Interface_console::Interface_console(int argc, char ** argv){
...
@@ -31,14 +31,8 @@ Interface_console::Interface_console(int argc, char ** argv){
QString
current_path
;
QString
current_path
;
app
=
new
QApplication
(
argc
,
argv
);
/* create the Qt application */
app
=
new
QApplication
(
argc
,
argv
);
/* create the Qt application */
current_path
=
QDir
::
currentPath
();
_run_env
[
0
]
=
new
char
[
current_path
.
length
()
+
1
];
_run_env
[
0
]
=
QDir
::
currentPath
();
if
(
!
strcpy
(
_run_env
[
0
],
current_path
.
toStdString
().
c_str
()))
{
cerr
<<
"Error : in "
<<
__FILE__
<<
" at line "
<<
__LINE__
<<
"."
<<
endl
;
cerr
<<
"Reason : Copy of the current path directory failed."
<<
endl
;
exit
(
EXIT_FAILURE
);
}
_run_env
[
1
]
=
argv
[
0
];
_run_env
[
1
]
=
argv
[
0
];
...
@@ -76,7 +70,7 @@ Interface_console::~Interface_console(){
...
@@ -76,7 +70,7 @@ Interface_console::~Interface_console(){
/* Qt desallocates _main_window and _render_opengl automatically */
/* Qt desallocates _main_window and _render_opengl automatically */
free
(
_run_env
[
0
]);
//
free(_run_env[0]);
}
}
...
@@ -421,6 +415,6 @@ void Interface_console::set_path_to_export(const string& path){
...
@@ -421,6 +415,6 @@ void Interface_console::set_path_to_export(const string& path){
_path_to_export
=
path
;
_path_to_export
=
path
;
}
}
c
har
const
*
const
*
Interface_console
::
get_runenv
()
const
{
c
onst
QString
*
Interface_console
::
get_runenv
()
const
{
return
_run_env
;
return
_run_env
;
}
}
This diff is collapsed.
Click to expand it.
src/interface/interface_console.hpp
+
2
−
8
View file @
cdb0d249
...
@@ -110,12 +110,6 @@ public:
...
@@ -110,12 +110,6 @@ public:
*/
*/
static
const
int
_STATE_LAUNCH_GRAPHICAL_INTERFACE
=
10
;
static
const
int
_STATE_LAUNCH_GRAPHICAL_INTERFACE
=
10
;
/*!
* \brief The size max (hoped) for the current directory name.
* Used for opening a new window with a new trace.
*/
static
const
int
_CURRENT_DIR_SIZE
=
256
;
/*!
/*!
* \brief Launch an action according to the argument state value.
* \brief Launch an action according to the argument state value.
* \arg state : an integer corresponding to a kind of action which must be executed.
* \arg state : an integer corresponding to a kind of action which must be executed.
...
@@ -158,7 +152,7 @@ protected:
...
@@ -158,7 +152,7 @@ protected:
/*!
/*!
*\brief This attributes contains the launching current directory (_run_env[0]) and the first argument of the running command (_run_env[1]).
*\brief This attributes contains the launching current directory (_run_env[0]) and the first argument of the running command (_run_env[1]).
*/
*/
char
*
_run_env
[
2
];
QString
_run_env
[
2
];
/*!
/*!
*\brief If a file must be opened, this attributes contains its path.
*\brief If a file must be opened, this attributes contains its path.
...
@@ -271,7 +265,7 @@ protected:
...
@@ -271,7 +265,7 @@ protected:
* \brief Get the _run_env matrix.
* \brief Get the _run_env matrix.
*
*
*/
*/
c
har
const
*
const
*
get_runenv
()
const
;
c
onst
QString
*
get_runenv
()
const
;
/***********************************
/***********************************
...
...
This diff is collapsed.
Click to expand it.
src/interface/interface_graphic.cpp
+
9
−
9
View file @
cdb0d249
...
@@ -192,21 +192,21 @@ void Interface_graphic::on_open_triggered(){
...
@@ -192,21 +192,21 @@ void Interface_graphic::on_open_triggered(){
if
(
!
filename
.
isEmpty
()){
if
(
!
filename
.
isEmpty
()){
if
(
_is_rendering_trace
==
true
){
/*
Realease the previous trace
*/
if
(
_is_rendering_trace
==
true
){
/*
open a new process
*/
QStringList
arguments
=
(
QStringList
()
<<
filename
);
QStringList
arguments
=
(
QStringList
()
<<
filename
);
QString
program
;
QString
*
program
;
c
har
const
*
const
*
run_env
=
_core
->
get_runenv
();
c
onst
QString
*
run_env
=
_core
->
get_runenv
();
Q
String
start_directory
=
run_env
[
0
];
Q
Dir
::
setCurrent
(
run_env
[
0
]
)
;
Q
Dir
::
setCurrent
(
start_directory
)
;
Q
String
run_cmd
=
run_env
[
1
]
;
if
(
run_
env
[
1
][
0
]
==
'.'
)
if
(
run_
cmd
.
startsWith
(
"."
)
)
program
=
QString
(
run_env
[
0
]
)
+
QString
(
run_env
[
1
]
+
sizeof
(
char
));
program
=
new
QString
(
run_env
[
0
]
+
(
run_cmd
.
remove
(
0
,
1
)
));
else
else
program
=
QString
(
run_
env
[
1
]
);
program
=
new
QString
(
run_
cmd
);
QProcess
*
new_process
=
new
QProcess
();
QProcess
*
new_process
=
new
QProcess
();
new_process
->
startDetached
(
program
,
arguments
);
new_process
->
startDetached
(
*
program
,
arguments
);
}
}
else
{
else
{
opening_file
(
filename
.
toStdString
());
opening_file
(
filename
.
toStdString
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment