Skip to content

Commit

Permalink
修复了linux下登录界面无法找到用户头像和qml中对象总提示某属性循环绑定的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
arjide committed Dec 15, 2014
1 parent cced0da commit 6875a21
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ int main(int argc, char *argv[])

QQmlComponent component0(engine, QUrl("qrc:/qml/Api/QQApi.qml"));
QQCommand *qqapi = qobject_cast<QQCommand *>(component0.create ());
qDebug()<<component0.errorString();

engine->rootContext ()->setContextProperty ("myqq", qqapi);

QQmlComponent component(engine, QUrl("qrc:/qml/Utility/SystemTray.qml"));
Expand Down
1 change: 1 addition & 0 deletions src/mywidgets/myimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ void MyImage::reLoad()
setStatus(Error);
return;
}

setImage(image);
}

Expand Down
18 changes: 14 additions & 4 deletions src/qqstars/qqiteminfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,25 @@ QString QQItemInfo::alias() const

QString QQItemInfo::avatar40() const
{
if(isCanUseSetting())
return mysettings->value ("avatar-40", "qrc:/images/avatar.png").toString ();
if(isCanUseSetting()){
QString temp_str = mysettings->value ("avatar-40", "qrc:/images/avatar.png").toString ();
if(temp_str.left(3)!="qrc")
temp_str = "file://"+temp_str;

return temp_str;
}
return "qrc:/images/avatar.png";
}

QString QQItemInfo::avatar240() const
{
if(isCanUseSetting())
return mysettings->value ("avatar-240", "qrc:/images/avatar.png").toString ();
if(isCanUseSetting()){
QString temp_str = mysettings->value ("avatar-240", "qrc:/images/avatar.png").toString ();
if(temp_str.left(3)!="qrc")
temp_str = "file://"+temp_str;

return temp_str;
}
return "qrc:/images/avatar.png";
}

Expand Down

0 comments on commit 6875a21

Please sign in to comment.