Permalink
Browse files

小修改

  • Loading branch information...
zhanlangsir committed May 27, 2012
1 parent 48c8541 commit 5ba168c35b59a51cb854e83f6c3b6cf60f1ce8da
View
7 README
@@ -1,6 +1,6 @@
About qtqq
-qt������qq������webqq3.0��
+qt开发的qq,基于webqq3.0协议!
Author: zhanlangsir <zhanlangsir@gmail.com>
@@ -9,15 +9,10 @@ Contributor:
project page: https://github.com/zhanlangsir/Qtqq
-
-
-
Licenses
1. The protocol of webqq3.0 is copyright at Tencent.Inc which is
a famous networking company in CHINA.
2. The picture of macqq.png and default.png is also the property
of Tencent.Inc.
-3.
-
View
@@ -101,7 +101,7 @@ QFrame#frame_login_btm {
QToolButton#btn_qqface {
border:none;
- background-image:url(F:/project/qtqq/skins/default/chatdlg/qqface.png);
+ background-image:url(%skin_path%/chatdlg/qqface.png);
background-repeat:no-repeat;
}
@@ -15,6 +15,7 @@
FriendChatLog::FriendChatLog(QString id):
id_(id),
+ page_count_(0),
curr_page_(0)
{
}
@@ -122,9 +122,7 @@ void GroupChatLog::parse(QByteArray &arr, QVector<ShareQQMsgPtr> &chat_logs)
QQChatItem item;
if (chat_datas[j]["t"].asInt() == 0) //小写字母l,非数字1,下同
{
- item.set_type(QQChatItem::kWord);
- QByteArray test = QString::fromStdString(chat_datas[j]["v"].asString()).toAscii();
- qDebug()<<test<<endl;
+ item.set_type(QQChatItem::kWord);
item.set_content(QString::fromStdString(chat_datas[j]["v"].asString()));
}
if (chat_datas[j]["t"].asInt() == 2)
View
@@ -16,12 +16,13 @@
QQLoginCore::QQLoginCore()
{
- fd_ = new QTcpSocket;
+ fd_ = new QTcpSocket();
}
QQLoginCore::~QQLoginCore()
{
fd_->close();
+ delete fd_;
}
void QQLoginCore::login(QString id, QString pwd, FriendStatus status)
View
@@ -6,7 +6,6 @@
#include <QUrl>
#include <QDateTime>
#include <QTextCodec>
-#include <qDebug>
#include "core/qqchatlog.h"
#include "core/qqmsg.h"
@@ -46,7 +45,7 @@ void QQChatLogWin::getFirstPage()
QVector<ShareQQMsgPtr>chat_logs = chat_log_->getLog(1);
showChatLog(chat_logs);
- if (chat_log_->totalPage() == 1)
+ if (chat_log_->totalPage() == 0 || chat_log_->totalPage() == 1)
{
ui_->btn_first->setEnabled(false);
ui_->btn_last->setEnabled(false);
@@ -91,6 +90,8 @@ void QQChatLogWin::getLastPage()
showChatLog(chat_logs);
ui_->btn_prep->setEnabled(false);
ui_->btn_last->setEnabled(false);
+ ui_->btn_first->setEnabled(true);
+ ui_->btn_next->setEnabled(true);
ui_->le_curr_page->setText(QString::number(chat_log_->currPage()));
}
View
@@ -3,7 +3,6 @@
#include <QPixmap>
#include <QIcon>
#include <assert.h>
-#include <QDebug>
#include <QFile>
#include <QPainter>
@@ -59,8 +58,6 @@ void QQItemModel::setPixmapDecoration(const QQItem *item, QPixmap &pixmap) const
if (item->status() == kOnline || item->status() == kOffline)
return;
- qDebug()<<item->status()<<endl;
-
QPainter painter(&pixmap);
QImage img;
@@ -81,9 +78,6 @@ void QQItemModel::setPixmapDecoration(const QQItem *item, QPixmap &pixmap) const
img.load(QQSettings::instance()->resourcePath() + "/avatar/silent.png");
}
- if (img.isNull())
- qDebug()<<"null img"<<endl;
-
QSize avatar_size = pixmap.size();
QSize decoration_size = img.size();
QPointF draw_point(avatar_size.width() - decoration_size.width(), avatar_size.height() - decoration_size.height());
@@ -207,7 +201,7 @@ QQItem* QQItemModel::itemFromIndex(const QModelIndex &index) const
return root_;
}
-QQItemModel::QQItemModel(QObject *parent) : QAbstractItemModel(parent), root_(new QQItem)
+QQItemModel::QQItemModel(QObject *parent) : QAbstractItemModel(parent), root_(new QQItem())
{
ItemInfo *info = new ItemInfo();
info->set_markName("root");
View
@@ -23,7 +23,7 @@
QQLoginWin::QQLoginWin(QQLoginCore *login_core, QWidget *parent) :
QQWidget(parent),
- ui(new Ui::QQLoginWin),
+ ui(new Ui::QQLoginWin()),
login_core_(login_core),
curr_login_info_(NULL)
{
@@ -33,8 +33,6 @@ QQLoginWin::QQLoginWin(QQLoginCore *login_core, QWidget *parent) :
setMouseTracking(true);
setWindowIcon(QIcon(QQSkinEngine::instance()->getSkinRes("app_icon")));
- //setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
-
qRegisterMetaType<LoginInfo>("LoginInfo");
connect(ui->pb_login, SIGNAL(clicked()), this, SLOT(onPbLoginClicked()));
@@ -20,10 +20,7 @@
<string>Dialog</string>
</property>
<property name="styleSheet">
- <string notr="true">QWidget#QQFriendChatDlg {
-border:1px solid grey;
-border-radius:5px;
-}</string>
+ <string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
View
@@ -20,10 +20,7 @@
<string>Dialog</string>
</property>
<property name="styleSheet">
- <string notr="true">QWidget#QQGroupChatDlg {
-border-radius:5px;
-border:1px solid grey;
-}</string>
+ <string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
View
@@ -35,13 +35,7 @@
<double>1.000000000000000</double>
</property>
<property name="styleSheet">
- <string notr="true">QDialog#QQLoginDlg {
-background-image: url(:/new/login/images/LoginPanel/Background/login_bg.png);
-border:1px solid white;
-border-radius:5px;
-padding:2px 4px;
-}
-</string>
+ <string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
@@ -180,8 +174,7 @@ border-radius:2px;</string>
</font>
</property>
<property name="styleSheet">
- <string notr="true">border:1px solid gray;
-border-radius:2px;</string>
+ <string notr="true"/>
</property>
<property name="editable">
<bool>true</bool>

0 comments on commit 5ba168c

Please sign in to comment.