зеркало из https://github.com/nextcloud/desktop.git
Do not use QSharedPointer to store FileProviderSocketControllers, use QPointer
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Родитель
d3c3181c0d
Коммит
9fff10fd5d
|
@ -71,7 +71,12 @@ void FileProviderSocketServer::slotNewConnection()
|
|||
|
||||
void FileProviderSocketServer::slotSocketDestroyed(const QLocalSocket * const socket)
|
||||
{
|
||||
_socketControllers.remove(socket);
|
||||
const auto socketController = _socketControllers.take(socket);
|
||||
|
||||
if (socketController) {
|
||||
const auto rawSocketControllerPtr = socketController.data();
|
||||
delete rawSocketControllerPtr;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Mac
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace OCC {
|
|||
namespace Mac {
|
||||
|
||||
class FileProviderSocketController;
|
||||
using FileProviderSocketControllerPtr = QSharedPointer<FileProviderSocketController>;
|
||||
using FileProviderSocketControllerPtr = QPointer<FileProviderSocketController>;
|
||||
|
||||
QString fileProviderSocketPath();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче