Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
@@ -27,7 +27,8 @@ linux-* {
|
||||
}
|
||||
|
||||
macx {
|
||||
cp_docs.commands = $${QMAKE_COPY_DIR} $${OUT_PWD}/doc $${OUT_PWD}/bin/QtCreator.app/Contents/Resources
|
||||
DOC_DIR = $${OUT_PWD}/bin/QtCreator.app/Contents/Resources/doc
|
||||
cp_docs.commands = mkdir -p $${DOC_DIR} ; $${QMAKE_COPY} $${QCH_FILE} $${DOC_DIR}
|
||||
cp_docs.depends += qch_docs
|
||||
docs.depends = cp_docs
|
||||
QMAKE_EXTRA_TARGETS += html_docs qch_docs cp_docs docs
|
||||
|
@@ -6,7 +6,6 @@ count(TOO_OLD_LIST, 1) {
|
||||
}
|
||||
|
||||
include(doc/doc.pri)
|
||||
include(share/share.pri)
|
||||
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
@@ -14,7 +14,7 @@ macx {
|
||||
RUNINTERMINAL.path = Contents/Resources
|
||||
RUNINTERMINAL.files = $$PWD/qtcreator/runInTerminal.command
|
||||
QMAKE_BUNDLE_DATA += SNIPPETS TEMPLATES DESIGNER SCHEMES GDBDEBUGGER LICENSE RUNINTERMINAL
|
||||
QMAKE_INFO_PLIST = $$PWD/qtcreator/info.plist
|
||||
QMAKE_INFO_PLIST = $$PWD/qtcreator/Info.plist
|
||||
}
|
||||
|
||||
win32 {
|
||||
|
@@ -38,3 +38,5 @@ macx {
|
||||
ICON = qtcreator.icns
|
||||
}
|
||||
|
||||
include(../../share/share.pri)
|
||||
|
||||
|
@@ -32,6 +32,9 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "fileiconprovider.h"
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QStyle>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
using namespace Core;
|
||||
|
||||
@@ -48,7 +51,7 @@ using namespace Core;
|
||||
FileIconProvider *FileIconProvider::m_instance = 0;
|
||||
|
||||
FileIconProvider::FileIconProvider()
|
||||
: m_unknownFileIcon(QLatin1String(":/core/images/unknownfile.png"))
|
||||
: m_unknownFileIcon(qApp->style()->standardIcon(QStyle::SP_FileIcon))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -76,7 +79,7 @@ QIcon FileIconProvider::icon(const QFileInfo &fileInfo)
|
||||
// same suffix (Mac OS X), but should speed up the retrieval a lot ...
|
||||
icon = m_systemIconProvider.icon(fileInfo);
|
||||
if (!suffix.isEmpty())
|
||||
registerIconForSuffix(icon, suffix);
|
||||
registerIconOverlayForSuffix(icon, suffix);
|
||||
#else
|
||||
if (fileInfo.isDir()) {
|
||||
icon = m_systemIconProvider.icon(fileInfo);
|
||||
@@ -89,11 +92,22 @@ QIcon FileIconProvider::icon(const QFileInfo &fileInfo)
|
||||
return icon;
|
||||
}
|
||||
|
||||
/*!
|
||||
Registers an icon for a given suffix, overriding any existing icon.
|
||||
*/
|
||||
void FileIconProvider::registerIconForSuffix(const QIcon &icon, const QString &suffix)
|
||||
// Creates a pixmap with baseicon at size and overlayous overlayIcon over it.
|
||||
QPixmap FileIconProvider::overlayIcon(QStyle::StandardPixmap baseIcon, const QIcon &overlayIcon, const QSize &size) const
|
||||
{
|
||||
QPixmap iconPixmap = qApp->style()->standardIcon(baseIcon).pixmap(size);
|
||||
QPainter painter(&iconPixmap);
|
||||
painter.drawPixmap(0, 0, overlayIcon.pixmap(size));
|
||||
painter.end();
|
||||
return iconPixmap;
|
||||
}
|
||||
|
||||
/*!
|
||||
Registers an icon for a given suffix, overlaying the system file icon
|
||||
*/
|
||||
void FileIconProvider::registerIconOverlayForSuffix(const QIcon &icon, const QString &suffix)
|
||||
{
|
||||
QPixmap fileIconPixmap = overlayIcon(QStyle::SP_FileIcon, icon, QSize(16, 16));
|
||||
// delete old icon, if it exists
|
||||
QList<QPair<QString,QIcon> >::iterator iter = m_cache.begin();
|
||||
for (; iter != m_cache.end(); ++iter) {
|
||||
@@ -103,7 +117,7 @@ void FileIconProvider::registerIconForSuffix(const QIcon &icon, const QString &s
|
||||
}
|
||||
}
|
||||
|
||||
QPair<QString,QIcon> newEntry(suffix, icon);
|
||||
QPair<QString,QIcon> newEntry(suffix, fileIconPixmap);
|
||||
m_cache.append(newEntry);
|
||||
}
|
||||
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#include <QtCore/QPair>
|
||||
#include <QtGui/QFileIconProvider>
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtGui/QStyle>
|
||||
|
||||
namespace Core {
|
||||
|
||||
@@ -48,7 +49,8 @@ public:
|
||||
~FileIconProvider(); // used to clear the cache
|
||||
QIcon icon(const QFileInfo &fileInfo);
|
||||
|
||||
void registerIconForSuffix(const QIcon &icon, const QString &suffix);
|
||||
QPixmap overlayIcon(QStyle::StandardPixmap baseIcon, const QIcon &overlayIcon, const QSize &size) const;
|
||||
void registerIconOverlayForSuffix(const QIcon &icon, const QString &suffix);
|
||||
|
||||
static FileIconProvider *instance();
|
||||
|
||||
|
@@ -75,9 +75,9 @@ CppPluginEditorFactory::CppPluginEditorFactory(CppPlugin *owner) :
|
||||
<< QLatin1String(CppEditor::Constants::CPP_SOURCE_MIMETYPE)
|
||||
<< QLatin1String(CppEditor::Constants::CPP_HEADER_MIMETYPE);
|
||||
Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance();
|
||||
iconProvider->registerIconForSuffix(QIcon(":/cppeditor/images/qt_cpp.png"),
|
||||
iconProvider->registerIconOverlayForSuffix(QIcon(":/cppeditor/images/qt_cpp.png"),
|
||||
QLatin1String("cpp"));
|
||||
iconProvider->registerIconForSuffix(QIcon(":/cppeditor/images/qt_h.png"),
|
||||
iconProvider->registerIconOverlayForSuffix(QIcon(":/cppeditor/images/qt_h.png"),
|
||||
QLatin1String("h"));
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 492 B |
@@ -52,7 +52,7 @@ FormEditorFactory::FormEditorFactory()
|
||||
m_mimeTypes(QLatin1String(FORM_MIMETYPE))
|
||||
{
|
||||
Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance();
|
||||
iconProvider->registerIconForSuffix(QIcon(":/formeditor/images/qt_ui.png"),
|
||||
iconProvider->registerIconOverlayForSuffix(QIcon(":/formeditor/images/qt_ui.png"),
|
||||
QLatin1String("ui"));
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 806 B |
@@ -48,6 +48,7 @@
|
||||
#include <QtGui/QVBoxLayout>
|
||||
#include <QtGui/QToolButton>
|
||||
#include <QtGui/QFocusEvent>
|
||||
#include <QtGui/QPalette>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace ProjectExplorer::Internal;
|
||||
@@ -74,6 +75,11 @@ public:
|
||||
setUniformRowHeights(true);
|
||||
setTextElideMode(Qt::ElideNone);
|
||||
setAlternatingRowColors(true);
|
||||
QPalette pal = palette();
|
||||
if (pal.base().color() == Qt::white) { // Leave dark themes as they are
|
||||
pal.setBrush(QPalette::AlternateBase, QColor(239, 239, 239));
|
||||
setPalette(pal);
|
||||
}
|
||||
setProperty("AlternateEmpty", true); // Let Manhattan to override style default
|
||||
// setExpandsOnDoubleClick(false);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 623 B |
@@ -56,9 +56,9 @@ ProFileEditorFactory::ProFileEditorFactory(Qt4Manager *manager, TextEditor::Text
|
||||
m_actionHandler(handler)
|
||||
{
|
||||
Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance();
|
||||
iconProvider->registerIconForSuffix(QIcon(":/qt4projectmanager/images/qt_project.png"),
|
||||
iconProvider->registerIconOverlayForSuffix(QIcon(":/qt4projectmanager/images/qt_project.png"),
|
||||
QLatin1String("pro"));
|
||||
iconProvider->registerIconForSuffix(QIcon(":/qt4projectmanager/images/qt_project.png"),
|
||||
iconProvider->registerIconOverlayForSuffix(QIcon(":/qt4projectmanager/images/qt_project.png"),
|
||||
QLatin1String("pri"));
|
||||
}
|
||||
|
||||
|
@@ -43,6 +43,7 @@
|
||||
#include <projectexplorer/nodesvisitor.h>
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/fileiconprovider.h>
|
||||
#include <coreplugin/filemanager.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/iversioncontrol.h>
|
||||
@@ -60,6 +61,7 @@
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QPushButton>
|
||||
@@ -94,7 +96,17 @@ Qt4PriFileNode::Qt4PriFileNode(Qt4Project *project, Qt4ProFileNode* qt4ProFileNo
|
||||
{
|
||||
Q_ASSERT(project);
|
||||
setFolderName(QFileInfo(filePath).baseName());
|
||||
setIcon(QIcon(":/qt4projectmanager/images/qt_project.png"));
|
||||
|
||||
static QIcon dirIcon;
|
||||
if (dirIcon.isNull()) {
|
||||
// Create a custom Qt dir icon based on the system icon
|
||||
Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance();
|
||||
QPixmap dirIconPixmap = iconProvider->overlayIcon(QStyle::SP_DirIcon,
|
||||
QIcon(":/qt4projectmanager/images/qt_project.png"),
|
||||
QSize(16, 16));
|
||||
dirIcon.addPixmap(dirIconPixmap);
|
||||
}
|
||||
setIcon(dirIcon);
|
||||
m_fileWatcher->addFile(filePath);
|
||||
connect(m_fileWatcher, SIGNAL(fileChanged(QString)),
|
||||
this, SLOT(scheduleUpdate()));
|
||||
|
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 676 B |
@@ -55,7 +55,7 @@ ResourceEditorFactory::ResourceEditorFactory(ResourceEditorPlugin *plugin) :
|
||||
m_context += Core::UniqueIDManager::instance()
|
||||
->uniqueIdentifier(QLatin1String(ResourceEditor::Constants::C_RESOURCEEDITOR));
|
||||
Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance();
|
||||
iconProvider->registerIconForSuffix(QIcon(":/resourceeditor/images/qt_qrc.png"),
|
||||
iconProvider->registerIconOverlayForSuffix(QIcon(":/resourceeditor/images/qt_qrc.png"),
|
||||
QLatin1String("qrc"));
|
||||
}
|
||||
|
||||
|