diff --git a/src/plugins/android/androidcreatekeystorecertificate.h b/src/plugins/android/androidcreatekeystorecertificate.h
index bcdc68750e204add72a1508fd66fe7f7202b6fd2..9bc89a691624ae8e2386320715b4a8e92cbd0552 100644
--- a/src/plugins/android/androidcreatekeystorecertificate.h
+++ b/src/plugins/android/androidcreatekeystorecertificate.h
@@ -35,9 +35,10 @@
 
 #include <QDialog>
 
-namespace Ui {
-    class AndroidCreateKeystoreCertificate;
-}
+QT_BEGIN_NAMESPACE
+namespace Ui { class AndroidCreateKeystoreCertificate; }
+QT_END_NAMESPACE
+
 namespace Android {
 namespace Internal {
 class AndroidCreateKeystoreCertificate : public QDialog