qt4 things

This commit is contained in:
Martin Rotter 2013-11-24 15:31:04 +01:00
parent d95856e2ca
commit 75bb3a25d3
3 changed files with 16 additions and 5 deletions

View File

@ -14,10 +14,6 @@ option(USE_QT_5 "Use Qt 5 for building" ON)
message(STATUS "[${APP_LOW_NAME}] Welcome to ${APP_NAME} compilation process.")
message(STATUS "[${APP_LOW_NAME}] Compilation process begins right now.")
#if(USE_QT_5 EQUAL false)
# message(FATAL_ERROR "[${APP_LOW_NAME}] Only Qt 5 is supported now.")
#endif(USE_QT_5 EQUAL false)
# Setup name for executable file.
if(APPLE)
set(EXE_NAME ${APP_UP_NAME})

View File

@ -12,6 +12,7 @@ MessagesView::MessagesView(QWidget *parent) : QTreeView(parent) {
setModel(m_proxyModel);
#if QT_VERSION >= 0x050000
// Setup column resize strategies.
header()->setSectionResizeMode(MSG_DB_ID_INDEX, QHeaderView::Interactive);
header()->setSectionResizeMode(MSG_DB_READ_INDEX, QHeaderView::ResizeToContents);
@ -24,6 +25,20 @@ MessagesView::MessagesView(QWidget *parent) : QTreeView(parent) {
header()->setSectionResizeMode(MSG_DB_DCREATED_INDEX, QHeaderView::Interactive);
header()->setSectionResizeMode(MSG_DB_DUPDATED_INDEX, QHeaderView::Interactive);
header()->setSectionResizeMode(MSG_DB_CONTENTS_INDEX, QHeaderView::Interactive);
#else
// Setup column resize strategies.
header()->setResizeMode(MSG_DB_ID_INDEX, QHeaderView::Interactive);
header()->setResizeMode(MSG_DB_READ_INDEX, QHeaderView::ResizeToContents);
header()->setResizeMode(MSG_DB_DELETED_INDEX, QHeaderView::Interactive);
header()->setResizeMode(MSG_DB_IMPORTANT_INDEX, QHeaderView::ResizeToContents);
header()->setResizeMode(MSG_DB_FEED_INDEX, QHeaderView::Interactive);
header()->setResizeMode(MSG_DB_TITLE_INDEX, QHeaderView::Stretch);
header()->setResizeMode(MSG_DB_URL_INDEX, QHeaderView::Interactive);
header()->setResizeMode(MSG_DB_AUTHOR_INDEX, QHeaderView::Interactive);
header()->setResizeMode(MSG_DB_DCREATED_INDEX, QHeaderView::Interactive);
header()->setResizeMode(MSG_DB_DUPDATED_INDEX, QHeaderView::Interactive);
header()->setResizeMode(MSG_DB_CONTENTS_INDEX, QHeaderView::Interactive);
#endif
// Hide columns.
hideColumn(MSG_DB_ID_INDEX);

View File

@ -49,7 +49,7 @@
typedef BOOL(WINAPI*PProcessIdToSessionId)(DWORD,DWORD*);
static PProcessIdToSessionId pProcessIdToSessionId = 0;
#endif
#if defined(Q_OS_UNIX)
#if defined(Q_OS_UNIX) || defined(Q_OS_OS2)
#include <sys/types.h>
#include <time.h>
#include <unistd.h>