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
6dfb127a
"src/plugins/git@git.qt.io:tohunger/qt-creator.git" did not exist on "e84de32ad1cd0d515b0891608969b4323635c38b"
Verified
Commit
6dfb127a
authored
1 year ago
by
Burak Hançerli
Browse files
Options
Downloads
Patches
Plain Diff
add: simple protocol for transferring the project over tcp
parent
92bb8368
No related branches found
No related tags found
2 merge requests
!22
QDS-11332 Implement better qmlproject handling
,
!21
Design studio connector
Pipeline
#64522
passed
1 year ago
Stage: build
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/dsConnector.cpp
+18
-26
18 additions, 26 deletions
src/dsConnector.cpp
src/dsConnector.h
+1
-1
1 addition, 1 deletion
src/dsConnector.h
with
19 additions
and
27 deletions
src/dsConnector.cpp
+
18
−
26
View file @
6dfb127a
...
...
@@ -29,31 +29,25 @@
void
DesignStudioConnector
::
receiveProject
()
{
qDebug
()
<<
"Reading data from Design Studio"
;
emit
networkStatusUpdated
(
"Reading data from Design Studio"
);
QByteArray
data
=
m_tcpSocket
->
readAll
();
qDebug
()
<<
"Data from Design Studio:"
<<
data
;
// if (data.startsWith(":qmlrc_project_starts:")) {
// qDebug() << "Received qmlrc_project";
// emit networkStatusUpdated("Received qmlrc_project");
// m_projectData.append(data.mid(21, data.size() - 21));
// m_receivingData = true;
// } else if (data.contains(":qmlrc_project_ends:")) {
// qDebug() << "Received qmlrc_project_ends";
// emit networkStatusUpdated("Received qmlrc_project_ends");
// m_projectData.append(data.mid(0, data.size() - 20));
// emit projectReceived(m_projectData);
// m_projectData.clear();
// m_receivingData = false;
// } else if (m_receivingData) {
// qDebug() << "Received data:" << data;
// emit networkStatusUpdated("Receiving project data");
// m_projectData.append(data);
// } else {
// qDebug() << "Received unknown data:" << data;
// emit networkStatusUpdated("Received unknown data");
// }
m_projectData
.
append
(
data
);
// qDebug() << "Data from Design Studio:" << data;
if
(
data
.
startsWith
(
"qres"
))
{
qDebug
()
<<
"TCP:: Received project start delimeter"
;
m_projectData
.
clear
();
m_projectData
.
append
(
data
);
m_receivingData
=
true
;
}
else
if
(
data
.
contains
(
"::qmlrc-end::"
))
{
qDebug
()
<<
"TCP:: Received project end delimeter"
;
// qDebug() << "TCP:: Last data sequence: " << data;
m_projectData
.
append
(
data
.
mid
(
0
,
data
.
size
()
-
13
));
emit
projectReceived
(
m_projectData
);
m_receivingData
=
false
;
}
else
if
(
m_receivingData
)
{
qDebug
()
<<
"TCP:: Received data sequence"
;
m_projectData
.
append
(
data
);
}
else
{
qDebug
()
<<
"TCP:: Received unknown data:"
<<
data
;
}
}
bool
DesignStudioConnector
::
initTcpServer
()
...
...
@@ -78,8 +72,6 @@ bool DesignStudioConnector::initTcpServer()
emit
networkStatusUpdated
(
"
\n
Local IP: "
+
m_ipv4Addr
+
"
\n
Waiting for Design Studio to connect..."
);
m_broadcastTimer
.
start
();
m_receivingData
=
false
;
emit
projectReceived
(
m_projectData
);
m_projectData
.
clear
();
});
...
...
This diff is collapsed.
Click to expand it.
src/dsConnector.h
+
1
−
1
View file @
6dfb127a
...
...
@@ -51,7 +51,7 @@ private:
QUdpSocket
m_udpSocket
;
QTimer
m_broadcastTimer
;
QString
m_ipv4Addr
;
const
quint32
m_udpPort
=
39
000
;
const
quint32
m_udpPort
=
45
000
;
// Other members
QByteArray
m_projectData
;
...
...
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