summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/saltimer.hxx25
-rw-r--r--vcl/inc/schedulerimpl.hxx43
-rw-r--r--vcl/qa/cppunit/lifecycle.cxx1
-rw-r--r--vcl/source/app/idle.cxx1
-rw-r--r--vcl/source/app/scheduler.cxx18
-rw-r--r--vcl/source/app/svapp.cxx3
-rw-r--r--vcl/source/app/timer.cxx2
-rw-r--r--vcl/source/uitest/uno/uiobject_uno.cxx1
8 files changed, 63 insertions, 31 deletions
diff --git a/vcl/inc/saltimer.hxx b/vcl/inc/saltimer.hxx
index fcf450d28a7b..e9f28169bf35 100644
--- a/vcl/inc/saltimer.hxx
+++ b/vcl/inc/saltimer.hxx
@@ -55,31 +55,6 @@ public:
}
};
-class Task;
-
-// Internal scheduler record holding intrusive linked list pieces
-struct ImplSchedulerData
-{
- ImplSchedulerData *mpNext; // Pointer to the next element in list
- Task *mpTask; // Pointer to VCL Task instance
- bool mbDelete; // Destroy this task?
- bool mbInScheduler; // Task currently processed?
- sal_uInt64 mnUpdateTime; // Last Update Time
-
- void Invoke();
-
- const char *GetDebugName() const;
-};
-
-template< typename charT, typename traits >
-inline std::basic_ostream<charT, traits> & operator <<(
- std::basic_ostream<charT, traits> & stream, const ImplSchedulerData& data )
-{
- stream << " i: " << data.mbInScheduler
- << " d: " << data.mbDelete;
- return stream;
-}
-
#endif // INCLUDED_VCL_INC_SALTIMER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/schedulerimpl.hxx b/vcl/inc/schedulerimpl.hxx
new file mode 100644
index 000000000000..af5f532df39a
--- /dev/null
+++ b/vcl/inc/schedulerimpl.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_SCHEDULERIMPL_HXX
+#define INCLUDED_VCL_INC_SCHEDULERIMPL_HXX
+
+#include <salwtype.hxx>
+
+class Task;
+
+// Internal scheduler record holding intrusive linked list pieces
+struct ImplSchedulerData final
+{
+ ImplSchedulerData* mpNext; ///< Pointer to the next element in list
+ Task* mpTask; ///< Pointer to VCL Task instance
+ bool mbDelete; ///< Destroy this task?
+ bool mbInScheduler; ///< Task currently processed?
+ sal_uInt64 mnUpdateTime; ///< Last Update Time
+
+ void Invoke();
+
+ const char *GetDebugName() const;
+};
+
+#endif // INCLUDED_VCL_INC_SCHEDULERIMPL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx
index b3a73af757a3..6cede7ceee4d 100644
--- a/vcl/qa/cppunit/lifecycle.cxx
+++ b/vcl/qa/cppunit/lifecycle.cxx
@@ -20,6 +20,7 @@
#include <vcl/dialog.hxx>
#include <vcl/layout.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/scheduler.hxx>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/lang/XComponent.hpp>
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index a086b5f5c8c9..8f5f8c002b08 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -18,6 +18,7 @@
*/
#include <vcl/idle.hxx>
+#include <vcl/scheduler.hxx>
#include "saltimer.hxx"
Idle::Idle( bool bAuto, const sal_Char *pDebugName )
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index b1b456e51625..4278891ec16a 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -19,10 +19,13 @@
#include <svdata.hxx>
#include <tools/time.hxx>
+#include <vcl/scheduler.hxx>
#include <vcl/idle.hxx>
#include <saltimer.hxx>
#include <salinst.hxx>
#include <comphelper/profilezone.hxx>
+#include <schedulerimpl.hxx>
+#include <svdata.hxx>
namespace {
const sal_uInt64 MaximumTimeoutMs = 1000 * 60; // 1 minute
@@ -71,8 +74,17 @@ inline std::basic_ostream<charT, traits> & operator <<(
return stream << static_cast<const Timer*>( &idle );
}
+template< typename charT, typename traits >
+inline std::basic_ostream<charT, traits> & operator <<(
+ std::basic_ostream<charT, traits> & stream, const ImplSchedulerData& data )
+{
+ stream << " i: " << data.mbInScheduler
+ << " d: " << data.mbDelete;
+ return stream;
}
+} // end anonymous namespace
+
void ImplSchedulerData::Invoke()
{
DBG_TESTSOLARMUTEX();
@@ -306,12 +318,6 @@ sal_uInt64 Scheduler::CalculateMinimumTimeout( bool &bHasActiveIdles )
return nMinPeriod;
}
-const char *ImplSchedulerData::GetDebugName() const
-{
- return mpTask && mpTask->GetDebugName() ?
- mpTask->GetDebugName() : "unknown";
-}
-
void Task::StartTimer( sal_uInt64 nMS )
{
Scheduler::ImplStartTimer( nMS, false );
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0116b3b596c8..ea6e0807cc7e 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -64,6 +64,9 @@
#include "window.h"
#include "accmgr.hxx"
#include "svids.hrc"
+#if OSL_DEBUG_LEVEL > 0
+#include "schedulerimpl.hxx"
+#endif
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/awt/XToolkit.hpp>
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 56f0922963b8..924ef62d0881 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -19,7 +19,9 @@
#include <tools/time.hxx>
#include <vcl/timer.hxx>
+#include <vcl/scheduler.hxx>
#include "saltimer.hxx"
+#include "schedulerimpl.hxx"
void Timer::SetDeletionFlags()
{
diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx
index 90205a5dff8e..317a06db6360 100644
--- a/vcl/source/uitest/uno/uiobject_uno.cxx
+++ b/vcl/source/uitest/uno/uiobject_uno.cxx
@@ -13,6 +13,7 @@
#include <o3tl/make_unique.hxx>
#include <vcl/svapp.hxx>
#include <vcl/idle.hxx>
+#include <vcl/scheduler.hxx>
#include <set>
#include <chrono>