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
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
kumir
kumir2
Commits
aae99306
Commit
aae99306
authored
Jun 03, 2015
by
Victor Yacovlev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build fix
parent
a6442965
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/tools/courseeditor/course_model.cpp
src/tools/courseeditor/course_model.cpp
+3
-3
src/tools/courseeditor/mainwindow.cpp
src/tools/courseeditor/mainwindow.cpp
+1
-1
No files found.
src/tools/courseeditor/course_model.cpp
View file @
aae99306
...
...
@@ -143,7 +143,7 @@ QVariant courseModel::data(const QModelIndex &index, int role) const
QDomNode
child_n
=
nodeById
(
child
.
internalId
(),
root
);
// if(child_n.isNull())return QModelIndex();
QDomNode
par
=
child_n
.
parentNode
();
if
(
par
.
toElement
().
attribute
(
"id"
).
toInt
()
==
0
)
return
createIndex
(
0
,
0
,
0
);
if
(
par
.
toElement
().
attribute
(
"id"
).
toInt
()
==
0
)
return
createIndex
(
0
,
0
,
(
void
*
)
0
);
return
createIndex
(
domRow
(
par
),
0
,
idByNode
(
par
));
};
int
courseModel
::
columnCount
(
const
QModelIndex
&
parent
)
const
...
...
@@ -207,7 +207,7 @@ QVariant courseModel::data(const QModelIndex &index, int role) const
}
QModelIndex
courseModel
::
createMyIndex
(
int
row
,
int
column
,
QModelIndex
parent
)
const
{
if
(
!
parent
.
isValid
())
return
createIndex
(
0
,
0
,
0
);
if
(
!
parent
.
isValid
())
return
createIndex
(
0
,
0
,
(
void
*
)
0
);
int
id
=
parent
.
internalId
();
if
(
id
<
0
)
return
QModelIndex
();
QDomNode
par
=
nodeById
(
id
,
root
);
...
...
@@ -446,7 +446,7 @@ QString courseModel::Script(int index,QString isp)
}
csEl
=
csEl
.
nextSiblingElement
(
"ISP"
);
};
return
QDomElement
();
};
void
courseModel
::
removeEvn
(
QDomElement
ispElement
,
QString
fieldStr
)
{
...
...
src/tools/courseeditor/mainwindow.cpp
View file @
aae99306
...
...
@@ -722,7 +722,7 @@ void MainWindowTask::closeEvent(QCloseEvent *event)
QMessageBox
::
StandardButton
ans
;
ans
=
QMessageBox
::
question
(
this
,
trUtf8
(
"Курсы"
),
trUtf8
(
"Вы хотите сохранить работу?"
),
QMessageBox
::
Yes
|
QMessageBox
::
No
|
QMessageBox
::
Cancel
,
QMessageBox
::
Yes
);
if
(
(
ans
==
QMessageBox
::
No
)
)
if
(
ans
==
QMessageBox
::
No
)
{
event
->
accept
();
...
...
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