Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
5c91c9fe
Kaydet (Commit)
5c91c9fe
authored
Mar 26, 2015
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix LazyDelete crasher, and add & test more post-dispose robustness.
Change-Id: I0e9460cb33b7cb5da9ddb950ff27bac8cbf7fed8
üst
7acf94a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
lifecycle.cxx
vcl/qa/cppunit/lifecycle.cxx
+17
-0
window2.cxx
vcl/source/window/window2.cxx
+8
-8
No files found.
vcl/qa/cppunit/lifecycle.cxx
Dosyayı görüntüle @
5c91c9fe
...
...
@@ -30,6 +30,7 @@ public:
void
testIsolatedWidgets
();
void
testParentedWidgets
();
void
testChildDispose
();
void
testPostDispose
();
CPPUNIT_TEST_SUITE
(
LifecycleTest
);
CPPUNIT_TEST
(
testCast
);
...
...
@@ -38,6 +39,7 @@ public:
CPPUNIT_TEST
(
testIsolatedWidgets
);
CPPUNIT_TEST
(
testParentedWidgets
);
CPPUNIT_TEST
(
testChildDispose
);
CPPUNIT_TEST
(
testPostDispose
);
CPPUNIT_TEST_SUITE_END
();
};
...
...
@@ -125,6 +127,21 @@ void LifecycleTest::testChildDispose()
xWin
->
disposeOnce
();
}
void
LifecycleTest
::
testPostDispose
()
{
VclPtr
<
WorkWindow
>
xWin
(
new
WorkWindow
((
vcl
::
Window
*
)
NULL
,
WB_STDWORK
));
xWin
->
disposeOnce
();
// check selected methods continue to work post-dispose
CPPUNIT_ASSERT
(
!
xWin
->
GetParent
());
xWin
->
Show
();
CPPUNIT_ASSERT
(
!
xWin
->
IsReallyShown
());
CPPUNIT_ASSERT
(
!
xWin
->
IsEnabled
());
CPPUNIT_ASSERT
(
!
xWin
->
IsInputEnabled
());
CPPUNIT_ASSERT
(
!
xWin
->
GetChild
(
0
));
CPPUNIT_ASSERT
(
!
xWin
->
GetWindow
(
0
));
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
LifecycleTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
vcl/source/window/window2.cxx
Dosyayı görüntüle @
5c91c9fe
...
...
@@ -975,27 +975,27 @@ vcl::Window* Window::ImplGetWindow()
ImplFrameData
*
Window
::
ImplGetFrameData
()
{
return
mpWindowImpl
->
mpFrameData
;
return
mpWindowImpl
?
mpWindowImpl
->
mpFrameData
:
NULL
;
}
SalFrame
*
Window
::
ImplGetFrame
()
const
{
return
mpWindowImpl
->
mpFrame
;
return
mpWindowImpl
?
mpWindowImpl
->
mpFrame
:
NULL
;
}
vcl
::
Window
*
Window
::
ImplGetParent
()
const
{
return
mpWindowImpl
->
mpParent
;
return
mpWindowImpl
?
mpWindowImpl
->
mpParent
.
get
()
:
NULL
;
}
vcl
::
Window
*
Window
::
ImplGetClientWindow
()
const
{
return
mpWindowImpl
->
mpClientWindow
;
return
mpWindowImpl
?
mpWindowImpl
->
mpClientWindow
.
get
()
:
NULL
;
}
vcl
::
Window
*
Window
::
ImplGetBorderWindow
()
const
{
return
mpWindowImpl
->
mpBorderWindow
;
return
mpWindowImpl
?
mpWindowImpl
->
mpBorderWindow
.
get
()
:
NULL
;
}
vcl
::
Window
*
Window
::
ImplGetFirstOverlapWindow
()
...
...
@@ -1237,7 +1237,7 @@ bool Window::IsReallyVisible() const
bool
Window
::
IsReallyShown
()
const
{
return
mpWindowImpl
->
mbReallyShown
;
return
mpWindowImpl
?
mpWindowImpl
->
mbReallyShown
:
false
;
}
bool
Window
::
IsInInitShow
()
const
...
...
@@ -1247,12 +1247,12 @@ bool Window::IsInInitShow() const
bool
Window
::
IsEnabled
()
const
{
return
!
mpWindowImpl
->
mbDisabled
;
return
mpWindowImpl
?
!
mpWindowImpl
->
mbDisabled
:
false
;
}
bool
Window
::
IsInputEnabled
()
const
{
return
!
mpWindowImpl
->
mbInputDisabled
;
return
mpWindowImpl
?
!
mpWindowImpl
->
mbInputDisabled
:
false
;
}
bool
Window
::
IsAlwaysEnableInput
()
const
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment