#warning directives
Leonardo Stern
leonardo.stern at gmail.com
Fri Oct 6 00:40:42 CEST 2006
I found some #warning directives in kdebase code that causes troubles
with msvc compiler and just put some #if __GNUC__ / #endif . I went
to #kde4-devel and ask about the best way to send back this and others
modifications and I was told to send patches to this list.
I'm pasting the patch , hope this is the right channel (instead of
kde-devel mailling list)
regards,
Leonardo Stern
Index: kate/app/kateconfigdialog.cpp
===================================================================
--- kate/app/kateconfigdialog.cpp (revision 592513)
+++ kate/app/kateconfigdialog.cpp (working copy)
@@ -253,7 +253,9 @@
path.clear();
#endif
KVBox *page = new KVBox();
+#ifdef __GNUC__
#warning portme
+#endif
#if 0
filelistConfigPage = new KFLConfigPage( page, mainWindow->filelist );
connect( filelistConfigPage, SIGNAL( changed() ), this, SLOT(
slotChanged() ) );
@@ -402,7 +404,9 @@
mainWindow->syncKonsole = cb_syncKonsole->isChecked();
//fileSelConfigPage->apply();
+#ifdef __GNUC__
#warning portme
+#endif
#if 0
filelistConfigPage->apply();
#endif
Index: kate/app/katemainwindow.cpp
===================================================================
--- kate/app/katemainwindow.cpp (revision 592513)
+++ kate/app/katemainwindow.cpp (working copy)
@@ -237,7 +237,9 @@
m_fileList->setDragEnabled(true);
m_fileList->setDragDropMode(QAbstractItemView::InternalMove);
m_fileList->setDropIndicatorShown(true);
+#ifdef __GNUC__
#warning I do not like it, it looks like a hack, search for a better
way, but for now it should work. (Even on windows most lisviews,
except exploder are single click) (jowenn)
+#endif
if (!style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick,
0, m_fileList)) {
kDebug()<<"HACK:***********************CONNECTING
CLICKED***************************"<<endl;
connect(m_fileList,SIGNAL(clicked(const
QModelIndex&)),m_pM,SLOT(opened(const QModelIndex&)));
@@ -501,8 +503,9 @@
fileOpenRecent->saveEntries(config, "Recent Files");
//fileselector->writeConfig(config, "fileselector");
-
+#ifdef __GNUC__
#warning PORTME
+#endif
//filelist->writeConfig(config, "Filelist");
}
Index: kate/app/kateviewdocumentproxymodel.cpp
===================================================================
--- kate/app/kateviewdocumentproxymodel.cpp (revision 592513)
+++ kate/app/kateviewdocumentproxymodel.cpp (working copy)
@@ -75,7 +75,9 @@
QByteArray encodedData =
data->data("application/x-kateviewdocumentproxymodel");
QDataStream stream(&encodedData, QIODevice::ReadOnly);
+#ifdef __GNUC__
#warning handle single item moves only for now;
+#endif
int sourcerow;
int sourcecolumn;
stream >> sourcerow;
@@ -116,7 +118,9 @@
}
Qt::DropActions KateViewDocumentProxyModel::supportedDropActions () const {
+#ifdef __GNUC__
#warning Qt needs Qt::CopyAction, otherwise nothing works
+#endif
return Qt::MoveAction | Qt::CopyAction;
}
Index: khelpcenter/kcmhelpcenter.cpp
===================================================================
--- khelpcenter/kcmhelpcenter.cpp (revision 592513)
+++ khelpcenter/kcmhelpcenter.cpp (working copy)
@@ -261,7 +261,9 @@
DocMetaInfo::self()->scanMetaInfo();
load();
+#ifdef __GNUC__
#warning "kde4: TODO port to dbus"
+#endif
#if 0
bool success = kapp->dcopClient()->connectDCOPSignal( "khc_indexbuilder",
0, "buildIndexProgress()", "kcmhelpcenter",
Index: khelpcenter/khc_indexbuilder.cpp
===================================================================
--- khelpcenter/khc_indexbuilder.cpp (revision 592513)
+++ khelpcenter/khc_indexbuilder.cpp (working copy)
@@ -133,7 +133,9 @@
void IndexBuilder::sendErrorSignal( const QString &error )
{
kDebug(1402) << "IndexBuilder::sendErrorSignal()" << endl;
+#ifdef __GNUC__
#warning "kde4: TODO dbus port"
+#endif
#if 0
QByteArray params;
QDataStream stream( ¶ms, QIODevice::WriteOnly );
@@ -147,7 +149,9 @@
void IndexBuilder::sendProgressSignal()
{
kDebug(1402) << "IndexBuilder::sendProgressSignal()" << endl;
+#ifdef __GNUC__
#warning "kde4: DBUS port !!!"
+#endif
//kapp->dcopClient()->emitDCOPSignal("buildIndexProgress()",
QByteArray() );
}
@@ -204,7 +208,9 @@
kDebug(1402) << "can access" << endl;
file.remove();
}
-#warning "kde4 port: TODO DBUS"
+#ifdef __GNUC__
+#warning "kde4 port: TODO DBUS"
+#endif
//app.dcopClient()->registerAs( "khc_indexbuilder", false );
IndexBuilder builder;
Index: konqueror/konq_factory.cc
===================================================================
--- konqueror/konq_factory.cc (revision 592513)
+++ konqueror/konq_factory.cc (working copy)
@@ -191,7 +191,9 @@
KService::List *partServiceOffers,
KService::List *appServiceOffers )
{
+#ifdef __GNUC__
#warning Temporary hack
+#endif
if ( partServiceOffers && serviceType[0].isUpper() ) {
*partServiceOffers = KServiceTypeTrader::self()->query( serviceType,
"DesktopEntryName != 'kfmclient' and
DesktopEntryName != 'kfmclient_dir' and DesktopEntryName !=
'kfmclient_html'");
Index: konqueror/listview/konq_listviewwidget.cc
===================================================================
--- konqueror/listview/konq_listviewwidget.cc (revision 592513)
+++ konqueror/listview/konq_listviewwidget.cc (working copy)
@@ -534,7 +534,9 @@
QPainter p;
p.begin( viewport() );
+#ifdef __GNUC__
#warning FIXME NotROP is not available in qt4
+#endif
//Using black with .5 alpha for now
//p.setRasterOp( NotROP );
QColor c( 0, 0, 0, 127 );
@@ -543,7 +545,9 @@
QPoint pt( m_rubber->x(), m_rubber->y() );
pt = contentsToViewport( pt );
+#ifdef __GNUC__
#warning PE_FocusRect is gone, using PE_FrameFocusRect
+#endif
QStyleOptionFocusRect fr;
fr.backgroundColor = c;
fr.rect = QRect( pt.x(), pt.y(), m_rubber->width(), m_rubber->height() );
@@ -907,7 +911,9 @@
KUrl url = fileItem->url();
url.cleanPath();
+#ifdef __GNUC__
#warning hardcoded protocol: find a better way to determine if a url
is a trash url.
+#endif
bool isIntoTrash = url.protocol() == "trash";
if ( !isIntoTrash || (isIntoTrash && fileItem->isDir()) )
m_pBrowserView->lmbClicked( fileItem );
Index: konqueror/settings/kio/ksaveioconfig.cpp
===================================================================
--- konqueror/settings/kio/ksaveioconfig.cpp (revision 592513)
+++ konqueror/settings/kio/ksaveioconfig.cpp (working copy)
@@ -234,7 +234,9 @@
{
// Inform all running io-slaves about the changes...
// if we cannot update, ioslaves inform the end user...
+#ifdef __GNUC__
#warning "kde4: port it to new dbus call"
+#endif
#if 0
if (!DCOPRef("*",
"KIO::Scheduler").send("reparseSlaveConfiguration", QString()))
{
Index: konqueror/settings/konqhtml/advancedTabDialog.cpp
===================================================================
--- konqueror/settings/konqhtml/advancedTabDialog.cpp (revision 592513)
+++ konqueror/settings/konqhtml/advancedTabDialog.cpp (working copy)
@@ -102,7 +102,9 @@
if ( m_advancedWidget->m_pTabConfirm->isChecked() )
m_pConfig->deleteEntry( "MultipleTabConfirm" );
else m_pConfig->writeEntry( "MultipleTabConfirm", true );
+#ifdef __GNUC__
#warning "kde4: port konqueror* dcop call"
+#endif
#if 0
KApplication::kApplication()->dcopClient()->send( "konqueror*",
"KonquerorIface", "reparseConfiguration()", data );
#endif
Index: konqueror/settings/konqhtml/appearance.cpp
===================================================================
--- konqueror/settings/konqhtml/appearance.cpp (revision 592513)
+++ konqueror/settings/konqhtml/appearance.cpp (working copy)
@@ -367,7 +367,9 @@
encodingName = "";
m_pConfig->writeEntry( "DefaultEncoding", encodingName );
m_pConfig->sync();
+#ifdef __GNUC__
#warning "kde4: port to dbus call konqueror*"
+#endif
#if 0
kapp->dcopClient()->send( "konqueror*", "KonquerorIface",
"reparseConfiguration()", data );
#endif
Index: konqueror/settings/konqhtml/htmlopts.cpp
===================================================================
--- konqueror/settings/konqhtml/htmlopts.cpp (revision 592513)
+++ konqueror/settings/konqhtml/htmlopts.cpp (working copy)
@@ -373,7 +373,9 @@
config->writeEntry("AdvancedAddBookmarkDialog",
m_pAdvancedAddBookmarkCheckBox->isChecked());
config->writeEntry("FilteredToolbar",
m_pOnlyMarkedBookmarksCheckBox->isChecked());
config->sync();
+#ifdef __GNUC__
#warning "kde4: port to dbus call konqueror*"
+#endif
#if 0
kapp->dcopClient()->send( "konqueror*", "KonquerorIface",
"reparseConfiguration()", data );
#endif
Index: konqueror/settings/konqhtml/pluginopts.cpp
===================================================================
--- konqueror/settings/konqhtml/pluginopts.cpp (revision 592513)
+++ konqueror/settings/konqhtml/pluginopts.cpp (working copy)
@@ -264,7 +264,9 @@
m_pConfig->sync(); // I need a sync here, otherwise "apply" won't work
// instantly
+#ifdef __GNUC__
#warning "kde4: port to dbus call konqueror*"
+#endif
#if 0
kapp->dcopClient()->send( "konqueror*", "KonquerorIface",
"reparseConfiguration()", data );
#endif
@@ -326,7 +328,9 @@
KProcIO* nspluginscan = new KProcIO;
QString scanExe = KGlobal::dirs()->findExe("nspluginscan");
+#ifdef __GNUC__
#warning !QString? i guess that meant isEmpty?
+#endif
if (scanExe.isEmpty()) {
kDebug() << "can't find nspluginviewer" << endl;
delete nspluginscan;
Index: konqueror/settings/performance/konqueror.cpp
===================================================================
--- konqueror/settings/performance/konqueror.cpp (revision 592513)
+++ konqueror/settings/performance/konqueror.cpp (working copy)
@@ -129,7 +129,9 @@
cfg.writeEntry( "PreloadOnStartup",
cb_preload_on_startup->isChecked() && count >= 1 );
cfg.writeEntry( "AlwaysHavePreloaded",
cb_always_have_preloaded->isChecked() && count >= 2 );
cfg.sync();
+#ifdef __GNUC__
#warning "kde4: port it konqueror*"
+#endif
#if 0
DCOPRef ref1( "konqueror*", "KonquerorIface" );
ref1.send( "reparseConfiguration()" );
Index: konqueror/sidebar/sidebar_widget.cpp
===================================================================
--- konqueror/sidebar/sidebar_widget.cpp (revision 592513)
+++ konqueror/sidebar/sidebar_widget.cpp (working copy)
@@ -261,7 +261,9 @@
m_buttonBar->showActiveTabTexts(true);
// Ported to QMenu already, just needs to have KMultiTabBar fixed
+#ifdef __GNUC__
#warning switch to QMenu when KMultiTabBar ported
+#endif
m_menu = new Q3PopupMenu(this);
m_menu->setIcon(SmallIconSet("configure"));
m_menu->setTitle(i18n("Configure Navigation Panel"));
Index: konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp
===================================================================
--- konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp (revision 592513)
+++ konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp (working copy)
@@ -157,8 +157,9 @@
void KonqSidebarDirTreeItem::itemSelected()
{
bool bInTrash = false;
-
+#ifdef __GNUC__
#warning hardcoded protocol check: replace with better way to
determine if a URL is a trash url
+#endif
if ( m_fileItem->url().protocol() == "trash" )
bInTrash = true;
Index: konqueror/sidebar/trees/konq_sidebartree.cpp
===================================================================
--- konqueror/sidebar/trees/konq_sidebartree.cpp (revision 592513)
+++ konqueror/sidebar/trees/konq_sidebartree.cpp (working copy)
@@ -1064,8 +1064,9 @@
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-
+#ifdef __GNUC__
#warning KonqSidebarTreeToolTip removed, must implemented in event() function
+#endif
/*
void KonqSidebarTreeToolTip::maybeTip( const QPoint &point )
{
More information about the Kde-windows
mailing list