File tree Expand file tree Collapse file tree 6 files changed +5784
-2
lines changed
Expand file tree Collapse file tree 6 files changed +5784
-2
lines changed Original file line number Diff line number Diff line change 1+ localhost
2+ 20002
Original file line number Diff line number Diff line change @@ -18,6 +18,16 @@ MainWindow::MainWindow(QWidget *parent)
1818 this ->validator = new QRegularExpressionValidator (QRegularExpression (" [A-Za-z0-9_]+" ), this );
1919 this ->ui ->reg_login ->setValidator (this ->validator );
2020 this ->ui ->reg_pas ->setValidator (this ->validator );
21+ QFile file (" :/connection.txt" );
22+ file.open (QIODevice::ReadOnly | QIODevice::Text);
23+ this ->host = file.readLine ();
24+ this ->host = this ->host .sliced (0 , this ->host .size () - 1 );
25+ this ->port = file.readLine ().toInt ();
26+
27+ QDir dir1 (QDir::currentPath ());
28+ dir1.mkdir (" images" );
29+ QDir dir2 (QDir::currentPath () + " /images" );
30+ dir2.mkdir (" patterns" );
2131
2232 for (size_t i = 0 ; i < this ->test_widget ->back .size (); i++)
2333 {
Original file line number Diff line number Diff line change @@ -146,8 +146,8 @@ private slots:
146146 std::vector<QHBoxLayout*> pattern_laoyut_list;
147147
148148 std::unique_ptr<QTcpSocket> socket;
149- const QString host{ " localhost " } ;
150- const quint16 port{ 20002 } ;
149+ QString host;
150+ quint16 port;
151151
152152 void send (const QString& data);
153153// QString recv();
Original file line number Diff line number Diff line change 22 <qresource prefix="/">
33 <file>icon.png</file>
44 <file>default.png</file>
5+ <file>connection.txt</file>
56 </qresource>
67</RCC>
You can’t perform that action at this time.
0 commit comments