Sorry for such noise, silly me :) Don't pay attention.<br><br><br><br><div class="gmail_quote">On Sun, Sep 27, 2009 at 7:24 PM, rahman duran <span dir="ltr"><<a href="mailto:a.rahman.duran@gmail.com">a.rahman.duran@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>Sorry, I had no internet connection because Vodafone TR's systems had serious damage with the flood disaster in İstanbul, as I use gprs/3g to connect. So I just able to look at this.<br>
<br>I have some problem here;<br>
<br>WiredWidget::WiredWidget(Knm::Connection * connection, QWidget * parent)<br>: SettingWidget(connection, parent), d(new WiredWidget::Private)<br>{<br> d->ui.setupUi(this);<br> d->setting = static_cast<Knm::WiredSetting *>(connection->setting(Knm::Setting::Wired));<br>
d->ui.mtu->setSuffix(ki18np(" byte", " bytes"));<br> foreach (Solid::Control::NetworkInterface * iface, Solid::Control::NetworkManager::networkInterfaces()) {<br> if (iface->type() == Solid::Control::NetworkInterface::Ieee8023) {<br>
Solid::Device * dev = new Solid::Device(iface->uni());<br> QString deviceText;<br> KNetworkManagerServicePrefs::instance(Knm::ConnectionPersistence::NETWORKMANAGEMENT_RCFILE);<br> <br>
if (!KNetworkManagerServicePrefs::self()->useTechnicalNames()) {<br> <br>#if KDE_IS_VERSION(4,3,60)<br> deviceText = dev->description();<br>#else<br> deviceText = dev->product();<br>
#endif<br> } else {<br> Solid::Control::NetworkInterface * iface = Solid::Control::NetworkManager::findNetworkInterface(iface->uni());<br> if (iface) {<br> deviceText = iface->interfaceName();<br>
}<br> }<br><br> Solid::Control::WiredNetworkInterface * wired = static_cast<Solid::Control::WiredNetworkInterface*>(iface);<br> d->ui.cmbMacAddress->addItem(i18nc("@item:inlist Solid Device Name (kernel interface name)", "%1 (%2)", deviceText, wired->interfaceName()), wired->hardwareAddress().toLatin1());<br>
}<br> }<br>}<br><br><br><br>It crashes with this line: Solid::Control::NetworkInterface * iface = Solid::Control::NetworkManager::findNetworkInterface(iface->uni());<br><br>here is backtrace:<br><br>
<p style="margin: 0px; text-indent: 0px;">Application: KDE Control Module (kdeinit4), signal: Segmentation fault</p>
<p style="margin: 0px; text-indent: 0px;">[KCrash Handler]</p>
<p style="margin: 0px; text-indent: 0px;">#6 0xb1f9a194 in ?? () from /usr/lib/libsolidcontrol.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#7 0xb1fa3b53 in Solid::Control::NetworkInterface::uni() const () from /usr/lib/libsolidcontrol.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#8 0xb202d66a in WiredWidget::WiredWidget (this=0x825e6d8, connection=0x8288238, parent=0x8270858) at /home/rahman/kde/sources/trunk/networkmanager/libs/ui/wiredwidget.cpp:72</p>
<p style="margin: 0px; text-indent: 0px;">#9 0xb204dce9 in WiredPreferences::WiredPreferences (this=0x8270858, parent=0xbfc90680, args=...) at /home/rahman/kde/sources/trunk/networkmanager/libs/ui/wiredpreferences.cpp:48</p>
<p style="margin: 0px; text-indent: 0px;">#10 0xb204f746 in ConnectionEditor::editorForConnectionType (this=0x80f0090, setDefaults=false, parent=0xbfc90680, type=Wired, args=...)</p>
<p style="margin: 0px; text-indent: 0px;"> at /home/rahman/kde/sources/trunk/networkmanager/libs/ui/connectioneditor.cpp:139</p>
<p style="margin: 0px; text-indent: 0px;">#11 0xb204f2f9 in ConnectionEditor::addConnection (this=0x80f0090, useDefaults=false, type=Wired, otherArgs=...) at /home/rahman/kde/sources/trunk/networkmanager/libs/ui/connectioneditor.cpp:93</p>
<p style="margin: 0px; text-indent: 0px;">#12 0xb2073c16 in ManageConnectionWidget::addClicked (this=0x8238d20) at /home/rahman/kde/sources/trunk/networkmanager/settings/config/manageconnectionwidget.cpp:255</p>
<p style="margin: 0px; text-indent: 0px;">#13 0xb2071665 in ManageConnectionWidget::qt_metacall (this=0x8238d20, _c=InvokeMetaMethod, _id=3, _a=0xbfc90838)</p>
<p style="margin: 0px; text-indent: 0px;"> at /home/rahman/kde/build/trunk/networkmanager/settings/config/moc_manageconnectionwidget.cpp:86</p>
<p style="margin: 0px; text-indent: 0px;">#14 0xb7f4c324 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#15 0xb7f4c801 in QMetaObject::activate(QObject*, QMetaObject const*, int, int, void**) () from /usr/lib/libQtCore.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#16 0xb71654b5 in QAbstractButton::clicked(bool) () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#17 0xb6e7d2fd in ?? () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#18 0xb6e7f03b in ?? () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#19 0xb6e7f2d6 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#20 0xb6b30bec in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#21 0xb6e7d190 in QAbstractButton::event(QEvent*) () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#22 0xb6f2a333 in QPushButton::event(QEvent*) () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#23 0xb6ad994c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#24 0xb6ae1c0b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#25 0xb7519301 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5</p>
<p style="margin: 0px; text-indent: 0px;">#26 0xb7f35e3e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#27 0xb6ae0c2c in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&) () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#28 0xb6b5183a in ?? () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#29 0xb6b50dae in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#30 0xb6b7bb08 in ?? () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#31 0xb66b4442 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0</p>
<p style="margin: 0px; text-indent: 0px;">#32 0xb66b7d18 in ?? () from /usr/lib/libglib-2.0.so.0</p>
<p style="margin: 0px; text-indent: 0px;">#33 0xb66b7e3e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0</p>
<p style="margin: 0px; text-indent: 0px;">#34 0xb7f61aa8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#35 0xb6b7b23a in ?? () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#36 0xb7f3445d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#37 0xb7f348a9 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#38 0xb6fba621 in QDialog::exec() () from /usr/lib/libQtGui.so.4</p>
<p style="margin: 0px; text-indent: 0px;">#39 0xb5be714b in kdemain () from /usr/lib/libkdeinit4_kcmshell4.so</p>
<p style="margin: 0px; text-indent: 0px;">#40 0x0804e147 in _start ()</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;"><br></p>
<p style="margin: 0px; text-indent: 0px;"><br></p>
<p style="margin: 0px; text-indent: 0px;"></p>iface()->uni() returns "<p style="margin: 0px; text-indent: 0px;"> /org/freedesktop/Hal/devices/net_00_24_8c_5f_40_a5</p>"<br><br>Any clue that why Solid crashs?<br>
<br><div class="gmail_quote">2009/9/15 Will Stephenson <span dir="ltr"><<a href="mailto:wstephenson@kde.org" target="_blank">wstephenson@kde.org</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="font-family: 'Cumberland AMT'; font-size: 10pt; font-weight: 400; font-style: normal;"><div class="im">
<p style="margin: 0px; text-indent: 0px;"><a href="http://bugs.kde.org/show_bug.cgi?id=207445" target="_blank">http://bugs.kde.org/show_bug.cgi?id=207445</a> :</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;"><a name="123fc51446c4b730_123bd2d90c9aa3bb_comment_text_0"></a><span>S</span><span>ome users prefer descriptive names eg 'Wireless Interface', others prefer</span></p>
<pre style="margin: 0px; text-indent: 0px;"><span>technical names eg 'eth0, wlan0'. This junior-job is about making it possible</span></pre>
<pre style="margin: 0px; text-indent: 0px;"><span>to choose. </span></pre>
<pre style="margin: 0px; text-indent: 0px;"></pre>
<pre style="margin: 0px; text-indent: 0px;"><span>The different styles are illustrated in the UnconfiguredInterfaceItem</span></pre>
</div><pre style="margin: 0px; text-indent: 0px;"><div class="im"><span>constructor in monolithic/unconfiguredinterfaceitem.cpp</span><br><br></div><p style="margin: 0px; text-indent: 0px;"> /org/freedesktop/Hal/devices/net_00_24_8c_5f_40_a5</p>
</pre><div class="im">
<pre style="margin: 0px; text-indent: 0px;"></pre>
<pre style="margin: 0px; text-indent: 0px;"><span>For this job you would have to </span></pre>
<pre style="margin: 0px; text-indent: 0px;"></pre>
<pre style="margin: 0px; text-indent: 0px;"><span>1) extend KNetworkManagerServicePrefs (via libs/internals/knmserviceprefs.kcfg)</span></pre>
<pre style="margin: 0px; text-indent: 0px;"><span>to store this preference</span></pre>
<pre style="margin: 0px; text-indent: 0px;"></pre>
<pre style="margin: 0px; text-indent: 0px;"><span>2) provide a checkbox somewhere in settings/config/traysettings.ui and</span></pre>
<pre style="margin: 0px; text-indent: 0px;"><span>settings/config/managetraywidget.cpp to control this setting</span></pre>
<pre style="margin: 0px; text-indent: 0px;"></pre>
<pre style="margin: 0px; text-indent: 0px;"><span>3) use this setting throughout monolithic and libs/ui to show either the</span></pre>
<pre style="margin: 0px; text-indent: 0px;"><span>Solid::Device description or interface name. At some points in the code I have</span></pre>
<pre style="margin: 0px; text-indent: 0px;"><span>already provided an if clause to do this, see UnconfiguredInterfaceItem as</span></pre>
<pre style="margin: 0px; text-indent: 0px;"><span>above. You can probably find all the places to change by grepping for</span></pre>
<pre style="margin: 0px 0px 12px; text-indent: 0px;"><span>Solid::Device.</span></pre>
<pre style="margin: 0px 0px 12px; text-indent: 0px;"><span>As usual, ask here or on IRC (wstephenson in #solid) for advice on this JJ.</span></pre>
<pre style="margin: 0px 0px 12px; text-indent: 0px;"></pre>
<pre style="margin: 0px 0px 12px; text-indent: 0px;"><span>Will</span></pre></div></div><br>_______________________________________________<br>
kde-networkmanager mailing list<br>
<a href="mailto:kde-networkmanager@kde.org" target="_blank">kde-networkmanager@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-networkmanager" target="_blank">https://mail.kde.org/mailman/listinfo/kde-networkmanager</a><br>
<br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>Rahman Duran<br><br>Software Engineer, Turkey<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Rahman Duran<br><br>Software Engineer, Turkey<br>