mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 876530 - Fix implicit conversions to already_AddRefed in Qt widget. r=romaxa
This commit is contained in:
parent
770924f80d
commit
521f8c10e6
@ -33,14 +33,13 @@ public:
|
||||
|
||||
static already_AddRefed<nsIdleServiceQt> GetInstance()
|
||||
{
|
||||
nsIdleServiceQt* idleService =
|
||||
static_cast<nsIdleServiceQt*>(nsIdleService::GetInstance().get());
|
||||
nsRefPtr<nsIdleServiceQt> idleService =
|
||||
nsIdleService::GetInstance().downcast<nsIdleServiceQt>();
|
||||
if (!idleService) {
|
||||
idleService = new nsIdleServiceQt();
|
||||
NS_ADDREF(idleService);
|
||||
}
|
||||
|
||||
return idleService;
|
||||
return idleService.forget();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -1011,14 +1011,13 @@ nsWindow::GetAttention(int32_t aCycleCount)
|
||||
static already_AddRefed<gfxASurface>
|
||||
GetSurfaceForQWidget(QWidget* aDrawable)
|
||||
{
|
||||
gfxASurface* result =
|
||||
nsRefPtr<gfxASurface> result =
|
||||
new gfxXlibSurface(gfxQtPlatform::GetXDisplay(aDrawable),
|
||||
aDrawable->winId(),
|
||||
DefaultVisualOfScreen(gfxQtPlatform::GetXScreen(aDrawable)),
|
||||
gfxIntSize(aDrawable->size().width(),
|
||||
aDrawable->size().height()));
|
||||
NS_IF_ADDREF(result);
|
||||
return result;
|
||||
return result.forget();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user