Commit Graph

589 Commits

Author SHA1 Message Date
fbd886e9db Merge pull request #3255 from Trial97/propagate_load
propagate load component error
2025-01-09 00:11:48 +02:00
d40c8b704c fix drop file on resource page
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2025-01-08 01:52:11 +02:00
6ebfcb91cf propagate load component error
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2024-12-31 13:44:22 +02:00
f9e450ace2 do not destroy the ping ConcurrentTask directly at the end of the task
Signed-off-by: iTrooz <hey@itrooz.fr>
2024-12-05 20:43:40 +01:00
4e48015868 currentQueryTask -> m_currentQueryTask
Signed-off-by: iTrooz <hey@itrooz.fr>
2024-12-05 20:43:40 +01:00
ba0bd5fd74 Use shared pointer to store server query task
Signed-off-by: iTrooz <hey@itrooz.fr>
2024-11-29 19:42:54 +01:00
1477d64400 add m_ prefix to class members
Signed-off-by: iTrooz <hey@itrooz.fr>
2024-11-29 19:42:52 +01:00
4aaf7b9b09 chore
Signed-off-by: iTrooz <hey@itrooz.fr>
2024-11-29 14:07:39 +01:00
01db826ec9 Reset online players UI component when refreshing 2024-11-29 00:58:08 +01:00
b0778e7a1f chore 2024-11-29 00:44:31 +01:00
09782745c6 make writePacketToSocket() clear data automatically 2024-11-29 00:44:25 +01:00
ae7d3379e4 abort current query task if present when refreshing 2024-11-29 00:39:43 +01:00
5eb417ff2b Always autodelete signal connections with this captured when the objet is deleted, just to be sure 2024-11-28 23:54:51 +01:00
cfb0c97262 use Json::requireInteger() 2024-11-28 18:09:38 +01:00
dbb88ca7df move ServerPingTask in its own file 2024-11-28 17:46:42 +01:00
8b90a9f2b3 remove infinite loop from readVarInt() 2024-11-28 17:32:49 +01:00
873232ebe3 remove infinite loop in writeVarInt() 2024-11-28 17:29:35 +01:00
26f50f9b81 connect job to deletion task before starting it
This ensures the signal is not fired before we have connected it
2024-11-26 18:50:37 +01:00
ca52d00b80 replace std::string by QString in emitFail() 2024-11-26 18:47:13 +01:00
66f36195d8 simplify code 2024-11-26 18:44:21 +01:00
f05548f3a3 remove implicit captures 2024-11-26 18:43:14 +01:00
3a9c030982 Do not timeout after just 3000ms
Keep the network default timeout
2024-11-26 18:24:46 +01:00
fef8ee2d1b Disconnect task finished signal when ServersModel is destroyed 2024-11-26 18:16:15 +01:00
7c61fec8e0 Make task output online players rather than updating Server itself
This doesn't really change anything
2024-11-26 18:03:35 +01:00
087ab70143 refresh UI when we got the players online 2024-11-26 14:33:02 +01:00
4fad298d67 put more McClient methods to private 2024-11-26 13:22:02 +01:00
520d6b0b42 run socket code in thread 2024-11-26 13:22:00 +01:00
7d2da19418 make McResolver have the same signal name conventions as Task 2024-11-25 01:09:47 +01:00
24b9815763 cleanup 2024-11-25 00:16:46 +01:00
7c8d2c9b55 always delete McResolver object, even when it fails 2024-11-25 00:16:25 +01:00
0c6f78dee2 communicate when ServerPingTask succeeds/fails 2024-11-25 00:10:17 +01:00
9ce5eaaa0c fix job being deleted before tasks are finished 2024-11-24 23:54:19 +01:00
5cfb5a6f0d do not capture things implicitely in lambdas 2024-11-24 16:37:42 +01:00
1fb0fe0171 ping servers when opening Servers page 2024-11-19 20:48:17 +01:00
a79a66c177 remove debug print 2024-11-19 20:43:04 +01:00
60fb922ba2 remove QObject parent argument from ServerPingTask constructor 2024-11-19 20:43:04 +01:00
7d04f0ee75 remove useless code when reading response 2024-11-17 20:06:08 +01:00
7cf24586c2 .hpp -> .h 2024-11-17 19:58:30 +01:00
9d5727e36b MCResolver -> McResolver 2024-11-17 19:51:15 +01:00
b8035ca078 refactor header and code into 2 files 2024-11-17 19:50:52 +01:00
8b7040d416 use Qt5-compatible writeString() impl 2024-11-17 19:37:15 +01:00
c3543b104b fix qDebug() call with string << append 2024-11-17 19:26:21 +01:00
2d06e0a111 Fix after rebase 2024-11-17 19:21:09 +01:00
1f094b9803 avoid translating back to stf string without reason 2024-11-17 19:10:15 +01:00
b35cffb347 fix warning about unused jsonLength 2024-11-17 19:10:15 +01:00
0d830e56e9 replace std::runtime_exception with PrismLauncher Exception + add try/catch 2024-11-17 19:10:15 +01:00
8cf0c2029c No need to close the socket, it is done automatically
https://doc.qt.io/qt-6/qtcpsocket.html#dtor.QTcpSocket
2024-11-17 19:10:15 +01:00
cba7e2dc36 use std::optional<> to signify when there is no value 2024-11-17 19:10:15 +01:00
6a7678a6e9 Actually show online players when clicking on the button 2024-11-17 19:10:15 +01:00
0a379a05ff replace my printf calls with qDebug 2024-11-17 19:10:15 +01:00