Skip to content

Commit b46ac91

Browse files
committed
Fixed QWebView resolution in browserClass
1 parent b4b50e8 commit b46ac91

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/viewfactory.cc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ QWebView* ViewFactory::create(const std::string &id)
2525
}
2626
else
2727
{
28-
// get first found QWebView; only for QWebView, for NativeWD need additional implementation
29-
FactoryMap::iterator it = factory.begin();
30-
for (it; it != factory.end(); ++it)
28+
if (id == "QWebView")
3129
{
32-
qDebug()<<"[WD]:"<<"ViewFactory create first found registered QWebView subclass:"<<QString(it->first.c_str());
33-
return it->second->create();
30+
// get first found QWebView
31+
FactoryMap::iterator it = factory.begin();
32+
for (it; it != factory.end(); ++it)
33+
{
34+
qDebug()<<"[WD]:"<<"ViewFactory create first found registered QWebView subclass:"<<QString(it->first.c_str());
35+
return it->second->create();
36+
}
3437
}
3538
qDebug()<<"[WD]:"<<"ViewFactory create default QWebViewExt";
3639
return new QWebViewExt;

0 commit comments

Comments
 (0)