Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Qt UI Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Design Studio
QML Viewer Projects
Qt UI Viewer
Commits
41c3790a
Verified
Commit
41c3790a
authored
1 month ago
by
Burak Hançerli
Browse files
Options
Downloads
Patches
Plain Diff
chore: get rid of sitringified function invokations
parent
84f10312
No related branches found
No related tags found
1 merge request
!80
chore: get rid of sitringified function invokations
Pipeline
#79854
passed
4 weeks ago
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/backend/backend.cpp
+24
-28
24 additions, 28 deletions
src/backend/backend.cpp
src/backend/backend.h
+0
-1
0 additions, 1 deletion
src/backend/backend.h
with
24 additions
and
29 deletions
src/backend/backend.cpp
+
24
−
28
View file @
41c3790a
...
...
@@ -67,10 +67,10 @@ Backend::Backend(QObject *parent)
if
(
m_projectManager
&&
!
m_lastSessionId
.
isEmpty
()
&&
m_lastSessionId
==
m_projectManager
->
sessionId
())
{
QMetaObject
::
invokeMethod
(
m_dsManager
.
get
(),
"
sendProjectLogs
"
,
&
DesignStudioManager
::
sendProjectLogs
,
Qt
::
QueuedConnection
,
Q_ARG
(
QString
,
m_lastProjectSenderId
)
,
Q_ARG
(
QString
,
msg
)
)
;
m_lastProjectSenderId
,
msg
);
}
});
...
...
@@ -81,7 +81,8 @@ Backend::Backend(QObject *parent)
qDebug
()
<<
"Application state changed to"
<<
state
;
if
(
state
==
Qt
::
ApplicationState
::
ApplicationSuspended
)
{
if
(
m_projectManager
&&
!
m_projectManager
->
sessionId
().
isEmpty
())
QMetaObject
::
invokeMethod
(
m_projectManager
.
get
(),
"stopProject"
);
QMetaObject
::
invokeMethod
(
m_projectManager
.
get
(),
&
ProjectManager
::
stopProject
);
m_dsManager
->
disconnectAllDesignStudios
();
popupClose
();
}
...
...
@@ -164,9 +165,9 @@ void Backend::initProjectManager()
return
;
QMetaObject
::
invokeMethod
(
m_dsManager
.
get
(),
"
sendProjectStopped
"
,
&
DesignStudioManager
::
sendProjectStopped
,
Qt
::
QueuedConnection
,
Q_ARG
(
QString
,
m_lastProjectSenderId
)
)
;
m_lastProjectSenderId
);
});
}
...
...
@@ -186,7 +187,7 @@ void Backend::initDsManager()
this
,
[
this
](
const
QString
&
id
,
const
QString
&
ipAddr
)
{
if
(
id
==
m_lastProjectSenderId
)
{
QMetaObject
::
invokeMethod
(
m_projectManager
.
get
(),
"
stopProject
"
);
QMetaObject
::
invokeMethod
(
m_projectManager
.
get
(),
&
ProjectManager
::
stopProject
);
}
emit
popupClose
();
});
...
...
@@ -206,7 +207,7 @@ void Backend::initDsManager()
m_lastProjectSenderId
=
id
;
m_lastSessionId
=
QUuid
::
createUuid
().
toString
(
QUuid
::
WithoutBraces
);
QMetaObject
::
invokeMethod
(
m_projectManager
.
get
(),
"
stopProject
"
,
&
ProjectManager
::
stopProject
,
Qt
::
QueuedConnection
);
});
...
...
@@ -223,27 +224,18 @@ void Backend::initDsManager()
qDebug
()
<<
"Project stop requested"
;
emit
popupClose
();
QMetaObject
::
invokeMethod
(
m_projectManager
.
get
(),
"
stopProject
"
,
&
ProjectManager
::
stopProject
,
Qt
::
QueuedConnection
);
QMetaObject
::
invokeMethod
(
m_dsManager
.
get
(),
"
sendProjectStopped
"
,
&
DesignStudioManager
::
sendProjectStopped
,
Qt
::
QueuedConnection
,
Q_ARG
(
QString
,
m_lastProjectSenderId
)
)
;
m_lastProjectSenderId
);
});
m_dsManager
->
init
();
qDebug
()
<<
"Design Studio Manager initialized"
;
}
void
Backend
::
connectDesignStudio
(
const
QString
&
ipAddr
)
{
QMetaObject
::
invokeMethod
(
m_dsManager
.
get
(),
"initDesignStudio"
,
Q_ARG
(
QString
,
ipAddr
),
Q_ARG
(
QString
,
""
));
emit
updatePopupText
(
"Connecting in the background..."
,
1500
);
}
void
Backend
::
runProject
(
const
QString
&
id
,
const
QByteArray
&
projectData
)
{
emit
updatePopupText
(
"Running project..."
);
...
...
@@ -251,17 +243,21 @@ void Backend::runProject(const QString &id, const QByteArray &projectData)
QTimer
::
singleShot
(
1000
,
[
this
,
id
,
projectData
]
{
bool
retVal
;
QMetaObject
::
invokeMethod
(
m_projectManager
.
get
(),
"
runProject
"
,
&
ProjectManager
::
runProject
,
Q_RETURN_ARG
(
bool
,
retVal
),
Q_ARG
(
QByteArray
,
projectData
)
,
Q_ARG
(
bool
,
autoScaleProject
()
)
,
Q_ARG
(
QString
,
m_lastSessionId
)
)
;
projectData
,
autoScaleProject
(),
m_lastSessionId
);
if
(
!
retVal
)
QMetaObject
::
invokeMethod
(
m_dsManager
.
get
(),
"sendProjectStopped"
,
Q_ARG
(
QString
,
id
));
QMetaObject
::
invokeMethod
(
m_dsManager
.
get
(),
&
DesignStudioManager
::
sendProjectStopped
,
id
);
else
{
QMetaObject
::
invokeMethod
(
m_projectManager
.
get
(),
"showAppWindow"
);
QMetaObject
::
invokeMethod
(
m_dsManager
.
get
(),
"sendProjectStarted"
,
Q_ARG
(
QString
,
id
));
QMetaObject
::
invokeMethod
(
m_projectManager
.
get
(),
&
ProjectManager
::
showAppWindow
);
QMetaObject
::
invokeMethod
(
m_dsManager
.
get
(),
&
DesignStudioManager
::
sendProjectStarted
,
id
);
}
emit
popupClose
();
...
...
@@ -295,7 +291,7 @@ void Backend::parseDesignViewerUrl(const QUrl &url)
return
;
}
connectDesignStudio
(
url
.
host
());
//
connectDesignStudio(url.host());
}
void
Backend
::
popupInterrupted
()
...
...
This diff is collapsed.
Click to expand it.
src/backend/backend.h
+
0
−
1
View file @
41c3790a
...
...
@@ -83,7 +83,6 @@ signals:
public
slots
:
QString
buildInfo
()
const
;
void
scanQrCode
();
void
connectDesignStudio
(
const
QString
&
ipAddr
);
void
parseDesignViewerUrl
(
const
QUrl
&
url
);
void
popupInterrupted
();
QJsonArray
getIpAddresses
()
const
;
...
...
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