diff options
Diffstat (limited to 'benchmarks/pt_mtheme/pt_mtheme.cpp')
-rw-r--r-- | benchmarks/pt_mtheme/pt_mtheme.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/benchmarks/pt_mtheme/pt_mtheme.cpp b/benchmarks/pt_mtheme/pt_mtheme.cpp index 596e6273..a6d6b965 100644 --- a/benchmarks/pt_mtheme/pt_mtheme.cpp +++ b/benchmarks/pt_mtheme/pt_mtheme.cpp @@ -20,14 +20,22 @@ #include "pt_mtheme.h" #include <mbenchmark.h> -#include <MComponentData> #include <MTheme> #include <QtTest/QtTest> -void Pt_MTheme::constructor() +void Pt_MTheme::uncachedConstructor() { - MTheme *theme = NULL; + MTheme *theme = 0; + MBENCHMARK_ONCE ( + theme = new MTheme("widgetsgallery"); + ) + delete theme; +} + +void Pt_MTheme::cachedConstructor() +{ + MTheme *theme = 0; MBENCHMARK_ONCE ( theme = new MTheme("widgetsgallery"); ) |