Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

修改debian打包文件

  • Loading branch information...
commit 4a7bb7dd635bfb6cf0baf3f66f8dc75cdd00167b 1 parent f22f542
@zhanlangsir authored
View
11 debian/changelog
@@ -0,0 +1,11 @@
+qtqq-test (0.8.2-0ubuntu13) precise; urgency=low
+
+ * 重新开放陌生人、群成员聊天
+ * 截图模块
+ * 图片自适应(之前是接收到的图片才能缩放,现在发送的也完成了)
+ * Tab聊天窗口快捷键alt+number切换,alt+c关闭对话框
+ * 其他界面上的细节修改
+ * 修复全局截屏的一个问题
+ * 降低内存占用
+
+ -- zhanlang <zhanlangsir@gmail.com> Thu, 28 Feb 2013 10:51:28 +0800
View
24 debian/control
@@ -1,25 +1,17 @@
-Source: qtqq
-Section: utils
-Priority: extra
+Source: qtqq-test
+Section: net
+Priority: optional
Maintainer: zhanlangsir <zhanlangsir@gmail.com>
Standards-Version: 3.9.2
Homepage: https://github.com/zhanlangsir/Qtqq
Build-Depends: debhelper (>= 8.0.0), cmake,
- libgtk2.0-dev, pkg-config, cdbs,
- libqt4-dev, zlib1g-dev,
- libqtwebkit-dev, libnotify-dev
+ pkg-config, cdbs, libqt4-dev, zlib1g-dev,
+ libqtwebkit-dev, libx11-dev
-Package: qtqq
+Package: qtqq-test
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends},
- qtqq-data
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Conflicts: qtqq
Description: Linux QQ for human beings
qtqq written in Qt4, which is free for all Linuxer!
Protol based from Tencent's Web QQ
-
-Package: qtqq-data
-Architecture: all
-Depends: ${misc:Depends}
-Recommends: qtqq
-Description: data files for qtqq
- Data files such as icons, ui files etc. for qtqq
View
0  debian/rules 100644 → 100755
File mode changed
View
4 src/chatwidget/friendchatdlg.cpp
@@ -53,7 +53,6 @@ void FriendChatDlg::initUi()
if ( pix.isNull() )
{
QString avatar_path = QQSkinEngine::instance()->skinRes("default_friend_avatar");
- qDebug() << avatar_path << endl;
QFile file(avatar_path);
file.open(QIODevice::ReadOnly);
pix.loadFromData(file.readAll());
@@ -125,10 +124,11 @@ QQChatLog *FriendChatDlg::getChatlog() const
void FriendChatDlg::onTalkableDataChanged(QVariant data, TalkableDataRole role)
{
+ Talkable *talkable = qobject_cast<Talkable *>(sender());
switch ( role )
{
case TDR_Avatar:
- ui->lbl_avatar_->setPixmap(data.value<QPixmap>());
+ ui->lbl_avatar_->setPixmap(talkable->avatar());
break;
case TDR_Status:
{
View
3  src/chatwidget/groupchatdlg.cpp
@@ -199,10 +199,11 @@ Contact *GroupChatDlg::findContactById(QString id) const
void GroupChatDlg::onTalkableDataChanged(QVariant data, TalkableDataRole role)
{
+ Talkable *talkable = qobject_cast<Talkable *>(sender());
switch ( role )
{
case TDR_Avatar:
- ui->lbl_avatar_->setPixmap(data.value<QPixmap>());
+ ui->lbl_avatar_->setPixmap(talkable->avatar());
break;
case TDR_Announcement:
ui->announcement->setPlainText(data.toString());
View
2  src/chatwidget/tabwindow.cpp
@@ -115,7 +115,7 @@ void TabWindow::onTalkableDataChanged(QVariant data, TalkableDataRole role)
case TDR_Avatar:
{
QIcon icon;
- QPixmap pix = data.value<QPixmap>();
+ QPixmap pix = talkable->avatar();
icon.addPixmap(pix);
ui->tab_widget->setTabIcon(indexOf(changed_page), icon);
}
View
34 src/core/talkable.h
@@ -90,21 +90,11 @@ class Talkable: public QObject
void setAvatarPath(QString avatar_path)
{
avatar_path_ = avatar_path;
-
- QFile file(avatar_path);
- file.open(QIODevice::ReadOnly);
- QByteArray data = file.readAll();
-
- setAvatar(data);
- file.close();
+ emit dataChanged(avatar_path_, TDR_Avatar);
}
void setAvatar(QByteArray data)
{
- QPixmap pix;
- pix.loadFromData(data);
- pix_ = pix;
-
QString avatar_dir = QQGlobal::tempDir() + "/avatar/";
QDir avatar_qdir(avatar_dir);
@@ -112,14 +102,28 @@ class Talkable: public QObject
avatar_qdir.mkdir(avatar_dir);
avatar_path_ = avatar_dir + id_ + ".jpg";
- pix.save(avatar_path_);
+ QFile file(avatar_path_);
+ file.open(QIODevice::WriteOnly);
+ file.write(data);
+ file.close();
- emit dataChanged(pix, TDR_Avatar);
+ emit dataChanged(avatar_path_, TDR_Avatar);
}
QPixmap avatar() const
{
- return pix_;
+ if ( avatar_path_.isEmpty() )
+ return QPixmap();
+
+ QByteArray data;
+ QFile file(avatar_path_);
+ file.open(QIODevice::ReadOnly);
+ data = file.readAll();
+ file.close();
+
+ QPixmap pix;
+ pix.loadFromData(data);
+ return pix;
}
QString avatarPath() const
@@ -134,7 +138,6 @@ class Talkable: public QObject
QString id_;
QString name_;
QString avatar_path_;
- QPixmap pix_;
TalkableType type_;
};
@@ -171,7 +174,6 @@ class Contact : public Talkable
{
Contact *new_cont = new Contact(id_, name_, type_);
new_cont->avatar_path_ = avatar_path_;
- new_cont->pix_ = pix_;
new_cont->markname_ = markname_;
new_cont->status_ = status_;
new_cont->client_type_ = client_type_;
Please sign in to comment.
Something went wrong with that request. Please try again.