Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-backports > by-pkgid > 9601c7beb4ff23e834bfa171795ed560 > files > 195

vidalia-0.2.9-1mdv2010.1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Vidalia: LogTreeItem.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_b47abd1aad201a152869566145babb61.html">src</a>&nbsp;&raquo;&nbsp;<a class="el" href="dir_695ba8f8357372e02d38c40b3c6dbe81.html">vidalia</a>&nbsp;&raquo;&nbsp;<a class="el" href="dir_b5419f0f3b920f7a66865768144dfe22.html">log</a>
  </div>
</div>
<div class="contents">
<h1>LogTreeItem.cpp</h1><a href="_log_tree_item_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">**  This file is part of Vidalia, and is subject to the license terms in the</span>
<a name="l00003"></a>00003 <span class="comment">**  LICENSE file, found in the top level directory of this distribution. If you</span>
<a name="l00004"></a>00004 <span class="comment">**  did not receive the LICENSE file with this file, you may obtain it from the</span>
<a name="l00005"></a>00005 <span class="comment">**  Vidalia source package distributed by the Vidalia Project at</span>
<a name="l00006"></a>00006 <span class="comment">**  http://www.vidalia-project.net/. No part of Vidalia, including this file,</span>
<a name="l00007"></a>00007 <span class="comment">**  may be copied, modified, propagated, or distributed except according to the</span>
<a name="l00008"></a>00008 <span class="comment">**  terms described in the LICENSE file.</span>
<a name="l00009"></a>00009 <span class="comment">*/</span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="comment">/*</span>
<a name="l00012"></a>00012 <span class="comment">** \file LogTreeItem.cpp</span>
<a name="l00013"></a>00013 <span class="comment">** \version $Id: LogTreeItem.cpp 4091 2009-08-30 03:10:07Z edmanm $</span>
<a name="l00014"></a>00014 <span class="comment">** \brief Item representing a single message in the message log</span>
<a name="l00015"></a>00015 <span class="comment">*/</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;<a class="code" href="_log_tree_item_8h.html">LogTreeItem.h</a>&quot;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &quot;<a class="code" href="_log_tree_widget_8h.html">LogTreeWidget.h</a>&quot;</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;<a class="code" href="stringutil_8h.html">stringutil.h</a>&quot;</span>
<a name="l00021"></a>00021 <span class="comment"></span>
<a name="l00022"></a>00022 <span class="comment">/** Defines the format used for displaying the date and time of a log message.*/</span>
<a name="l00023"></a><a class="code" href="_log_tree_item_8cpp.html#a88d14c36233b470fce94ac3f4fe3d707">00023</a> <span class="preprocessor">#define DATETIME_FMT  &quot;MMM dd hh:mm:ss.zzz&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="comment">/* Column index values */</span>
<a name="l00026"></a><a class="code" href="_log_tree_item_8cpp.html#af25e7f0ebd0909e7109233e8ea4c3019">00026</a> <span class="preprocessor">#define COL_TIME    LogTreeWidget::TimeColumn</span>
<a name="l00027"></a><a class="code" href="_log_tree_item_8cpp.html#a83d55c64786e4f462270b201839c4cbb">00027</a> <span class="preprocessor"></span><span class="preprocessor">#define COL_TYPE    LogTreeWidget::TypeColumn</span>
<a name="l00028"></a><a class="code" href="_log_tree_item_8cpp.html#ac52e46c7907d97c9d372e67b6945a415">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define COL_MESG    LogTreeWidget::MessageColumn</span>
<a name="l00029"></a><a class="code" href="_log_tree_item_8cpp.html#a659a0d9500f315e1afbc74b5f7c1a75e">00029</a> <span class="preprocessor"></span><span class="preprocessor">#define ROLE_TYPE   Qt::UserRole</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="comment"></span>
<a name="l00032"></a>00032 <span class="comment">/** Default constructor. */</span>
<a name="l00033"></a><a class="code" href="class_log_tree_item.html#a8fbecc8641602916fca24d9b52f8f79f">00033</a> <a class="code" href="class_log_tree_item.html#a8fbecc8641602916fca24d9b52f8f79f">LogTreeItem::LogTreeItem</a>(<a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4c">tc::Severity</a> type, <span class="keyword">const</span> QString &amp;message, 
<a name="l00034"></a>00034                          <span class="keyword">const</span> QDateTime &amp;timestamp)
<a name="l00035"></a>00035   : QTreeWidgetItem()
<a name="l00036"></a>00036 {
<a name="l00037"></a>00037   <span class="keyword">static</span> quint32 seqnum = 0;
<a name="l00038"></a>00038   
<a name="l00039"></a>00039   <span class="comment">/* Set this message&#39;s sequence number */</span>
<a name="l00040"></a>00040   <a class="code" href="class_log_tree_item.html#a8a6810ffc4f0b748277853139b40b5c0">_seqnum</a> = seqnum++;
<a name="l00041"></a>00041   <span class="comment">/* Set the item&#39;s log time */</span>
<a name="l00042"></a>00042   <a class="code" href="class_log_tree_item.html#ae89ab14a8797f14d2e3ef01899e03984">setTimestamp</a>(timestamp);
<a name="l00043"></a>00043   <span class="comment">/* Set the item&#39;s severity and appropriate color. */</span>
<a name="l00044"></a>00044   <a class="code" href="class_log_tree_item.html#a8b55628257d409e3ed4c25c51b4894ba">setSeverity</a>(type);
<a name="l00045"></a>00045   <span class="comment">/* Set the item&#39;s message text. */</span>
<a name="l00046"></a>00046   <a class="code" href="class_log_tree_item.html#a811a7dfaad3b892d1d57334915515b6f">setMessage</a>(message);
<a name="l00047"></a>00047 }
<a name="l00048"></a>00048 <span class="comment"></span>
<a name="l00049"></a>00049 <span class="comment">/** Returns a printable string representing the fields of this item. */</span>
<a name="l00050"></a>00050 QString
<a name="l00051"></a><a class="code" href="class_log_tree_item.html#a960687c707ff519a011ee3e43b958c7f">00051</a> <a class="code" href="class_log_tree_item.html#a960687c707ff519a011ee3e43b958c7f">LogTreeItem::toString</a>()<span class="keyword"> const</span>
<a name="l00052"></a>00052 <span class="keyword"></span>{
<a name="l00053"></a>00053   <span class="keywordflow">return</span> QString(<span class="stringliteral">&quot;%1 [%2] %3&quot;</span>).arg(text(<a class="code" href="_log_header_view_8cpp.html#af25e7f0ebd0909e7109233e8ea4c3019">COL_TIME</a>))
<a name="l00054"></a>00054                               .arg(text(<a class="code" href="_log_header_view_8cpp.html#a83d55c64786e4f462270b201839c4cbb">COL_TYPE</a>))
<a name="l00055"></a>00055                               .arg(text(<a class="code" href="_log_header_view_8cpp.html#ac52e46c7907d97c9d372e67b6945a415">COL_MESG</a>).trimmed());
<a name="l00056"></a>00056 }
<a name="l00057"></a>00057 <span class="comment"></span>
<a name="l00058"></a>00058 <span class="comment">/** Sets the item&#39;s log time. */</span>
<a name="l00059"></a>00059 <span class="keywordtype">void</span>
<a name="l00060"></a><a class="code" href="class_log_tree_item.html#ae89ab14a8797f14d2e3ef01899e03984">00060</a> <a class="code" href="class_log_tree_item.html#ae89ab14a8797f14d2e3ef01899e03984">LogTreeItem::setTimestamp</a>(<span class="keyword">const</span> QDateTime &amp;timestamp)
<a name="l00061"></a>00061 {
<a name="l00062"></a>00062   QString strtime = timestamp.toString(<a class="code" href="_bandwidth_graph_8cpp.html#a88d14c36233b470fce94ac3f4fe3d707">DATETIME_FMT</a>);
<a name="l00063"></a>00063   setText(<a class="code" href="_log_header_view_8cpp.html#af25e7f0ebd0909e7109233e8ea4c3019">COL_TIME</a>, strtime);
<a name="l00064"></a>00064   setToolTip(<a class="code" href="_log_header_view_8cpp.html#af25e7f0ebd0909e7109233e8ea4c3019">COL_TIME</a>, strtime);
<a name="l00065"></a>00065 }
<a name="l00066"></a>00066 <span class="comment"></span>
<a name="l00067"></a>00067 <span class="comment">/** Sets the item&#39;s severity and the appropriate background color. */</span>
<a name="l00068"></a>00068 <span class="keywordtype">void</span>
<a name="l00069"></a><a class="code" href="class_log_tree_item.html#a8b55628257d409e3ed4c25c51b4894ba">00069</a> <a class="code" href="class_log_tree_item.html#a8b55628257d409e3ed4c25c51b4894ba">LogTreeItem::setSeverity</a>(<a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4c">tc::Severity</a> type)
<a name="l00070"></a>00070 {
<a name="l00071"></a>00071   <span class="comment">/* Change row and text color for serious warnings and errors. */</span>
<a name="l00072"></a>00072   <span class="keywordflow">if</span> (type == <a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4ca7d49d1d76d666767ae5854465bb86347">tc::ErrorSeverity</a>) {
<a name="l00073"></a>00073     <span class="comment">/* Critical messages are red with white text. */</span>
<a name="l00074"></a>00074     <span class="keywordflow">for</span> (<span class="keywordtype">int</span> <a class="code" href="html_8cpp.html#a4a5dba6492ea149585950c59c210ff47">i</a> = 0; <a class="code" href="html_8cpp.html#a4a5dba6492ea149585950c59c210ff47">i</a> &lt; 3; <a class="code" href="html_8cpp.html#a4a5dba6492ea149585950c59c210ff47">i</a>++) {
<a name="l00075"></a>00075       setBackgroundColor(<a class="code" href="html_8cpp.html#a4a5dba6492ea149585950c59c210ff47">i</a>, Qt::red);
<a name="l00076"></a>00076       setTextColor(<a class="code" href="html_8cpp.html#a4a5dba6492ea149585950c59c210ff47">i</a>, Qt::white);
<a name="l00077"></a>00077     }
<a name="l00078"></a>00078   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (type == <a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4caf725bd8cec9af5609e47aea4e9ec5011">tc::WarnSeverity</a>) {
<a name="l00079"></a>00079     <span class="comment">/* Warning messages are yellow with black text. */</span>
<a name="l00080"></a>00080     <span class="keywordflow">for</span> (<span class="keywordtype">int</span> <a class="code" href="html_8cpp.html#a4a5dba6492ea149585950c59c210ff47">i</a> = 0; <a class="code" href="html_8cpp.html#a4a5dba6492ea149585950c59c210ff47">i</a> &lt; 3; <a class="code" href="html_8cpp.html#a4a5dba6492ea149585950c59c210ff47">i</a>++) {
<a name="l00081"></a>00081       setBackgroundColor(<a class="code" href="html_8cpp.html#a4a5dba6492ea149585950c59c210ff47">i</a>, Qt::yellow);
<a name="l00082"></a>00082     }
<a name="l00083"></a>00083   }
<a name="l00084"></a>00084   
<a name="l00085"></a>00085   setTextAlignment(<a class="code" href="_log_header_view_8cpp.html#a83d55c64786e4f462270b201839c4cbb">COL_TYPE</a>, Qt::AlignCenter);
<a name="l00086"></a>00086   setText(<a class="code" href="_log_header_view_8cpp.html#a83d55c64786e4f462270b201839c4cbb">COL_TYPE</a>, <a class="code" href="class_log_tree_item.html#ad9b2e97bc9e33c01ba14270574d83935">severityToString</a>(type));
<a name="l00087"></a>00087   setData(<a class="code" href="_log_header_view_8cpp.html#a83d55c64786e4f462270b201839c4cbb">COL_TYPE</a>, <a class="code" href="_log_tree_item_8cpp.html#a659a0d9500f315e1afbc74b5f7c1a75e">ROLE_TYPE</a>, (uint)type);
<a name="l00088"></a>00088 }
<a name="l00089"></a>00089 <span class="comment"></span>
<a name="l00090"></a>00090 <span class="comment">/** Sets the item&#39;s message text. */</span>
<a name="l00091"></a>00091 <span class="keywordtype">void</span>
<a name="l00092"></a><a class="code" href="class_log_tree_item.html#a811a7dfaad3b892d1d57334915515b6f">00092</a> <a class="code" href="class_log_tree_item.html#a811a7dfaad3b892d1d57334915515b6f">LogTreeItem::setMessage</a>(<span class="keyword">const</span> QString &amp;message)
<a name="l00093"></a>00093 {
<a name="l00094"></a>00094   setText(<a class="code" href="_log_header_view_8cpp.html#ac52e46c7907d97c9d372e67b6945a415">COL_MESG</a>, message);
<a name="l00095"></a>00095   setToolTip(<a class="code" href="_log_header_view_8cpp.html#ac52e46c7907d97c9d372e67b6945a415">COL_MESG</a>, <a class="code" href="stringutil_8cpp.html#a5a9147db4c941c08f95e403b9d322e9b">string_wrap</a>(message, 80, <span class="stringliteral">&quot; &quot;</span>, <span class="stringliteral">&quot;\r\n&quot;</span>));
<a name="l00096"></a>00096 }
<a name="l00097"></a>00097 <span class="comment"></span>
<a name="l00098"></a>00098 <span class="comment">/** Returns the severity associated with this log item. */</span>
<a name="l00099"></a>00099 <a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4c">tc::Severity</a>
<a name="l00100"></a><a class="code" href="class_log_tree_item.html#a6a76ab403c2c9189a28f260a08dd9e50">00100</a> <a class="code" href="class_log_tree_item.html#a6a76ab403c2c9189a28f260a08dd9e50">LogTreeItem::severity</a>()<span class="keyword"> const</span>
<a name="l00101"></a>00101 <span class="keyword"></span>{
<a name="l00102"></a>00102   <span class="keywordflow">return</span> (<a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4c">tc::Severity</a>)data(<a class="code" href="_log_header_view_8cpp.html#a83d55c64786e4f462270b201839c4cbb">COL_TYPE</a>, <a class="code" href="_log_tree_item_8cpp.html#a659a0d9500f315e1afbc74b5f7c1a75e">ROLE_TYPE</a>).toUInt();
<a name="l00103"></a>00103 }
<a name="l00104"></a>00104 <span class="comment"></span>
<a name="l00105"></a>00105 <span class="comment">/** Returns the timestamp for this log message. */</span>
<a name="l00106"></a>00106 QDateTime
<a name="l00107"></a><a class="code" href="class_log_tree_item.html#ad5df193e613ecc555434206b148b6e9d">00107</a> <a class="code" href="class_log_tree_item.html#ad5df193e613ecc555434206b148b6e9d">LogTreeItem::timestamp</a>()<span class="keyword"> const</span>
<a name="l00108"></a>00108 <span class="keyword"></span>{
<a name="l00109"></a>00109   <span class="keywordflow">return</span> QDateTime::fromString(text(<a class="code" href="_log_header_view_8cpp.html#af25e7f0ebd0909e7109233e8ea4c3019">COL_TIME</a>), <a class="code" href="_bandwidth_graph_8cpp.html#a88d14c36233b470fce94ac3f4fe3d707">DATETIME_FMT</a>);
<a name="l00110"></a>00110 }
<a name="l00111"></a>00111 <span class="comment"></span>
<a name="l00112"></a>00112 <span class="comment">/** Returns the message for this log item. */</span>
<a name="l00113"></a>00113 QString
<a name="l00114"></a><a class="code" href="class_log_tree_item.html#a985987181f25631224c95845b4a2575e">00114</a> <a class="code" href="class_log_tree_item.html#a985987181f25631224c95845b4a2575e">LogTreeItem::message</a>()<span class="keyword"> const</span>
<a name="l00115"></a>00115 <span class="keyword"></span>{
<a name="l00116"></a>00116   <span class="keywordflow">return</span> text(<a class="code" href="_log_header_view_8cpp.html#ac52e46c7907d97c9d372e67b6945a415">COL_MESG</a>);
<a name="l00117"></a>00117 }
<a name="l00118"></a>00118 <span class="comment"></span>
<a name="l00119"></a>00119 <span class="comment">/** Converts a tc::Severity enum value to a localized string description. */</span>
<a name="l00120"></a>00120 QString
<a name="l00121"></a><a class="code" href="class_log_tree_item.html#ad9b2e97bc9e33c01ba14270574d83935">00121</a> <a class="code" href="class_log_tree_item.html#ad9b2e97bc9e33c01ba14270574d83935">LogTreeItem::severityToString</a>(<a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4c">tc::Severity</a> severity)
<a name="l00122"></a>00122 {
<a name="l00123"></a>00123   QString str;
<a name="l00124"></a>00124   <span class="keywordflow">switch</span> (severity) {
<a name="l00125"></a>00125     <span class="keywordflow">case</span> <a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4ca1702e192603d01187bf33f995d8fe001">tc::DebugSeverity</a>:  str = tr(<span class="stringliteral">&quot;Debug&quot;</span>); <span class="keywordflow">break</span>;
<a name="l00126"></a>00126     <span class="keywordflow">case</span> <a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4cafa0b1f9ecf83ea4ba0f9eba1794c7859">tc::InfoSeverity</a>:   str = tr(<span class="stringliteral">&quot;Info&quot;</span>); <span class="keywordflow">break</span>;
<a name="l00127"></a>00127     <span class="keywordflow">case</span> <a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4ca524b0a89904a99246d8ede417bec3b40">tc::NoticeSeverity</a>: str = tr(<span class="stringliteral">&quot;Notice&quot;</span>); <span class="keywordflow">break</span>;
<a name="l00128"></a>00128     <span class="keywordflow">case</span> <a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4caf725bd8cec9af5609e47aea4e9ec5011">tc::WarnSeverity</a>:   str = tr(<span class="stringliteral">&quot;Warning&quot;</span>); <span class="keywordflow">break</span>;
<a name="l00129"></a>00129     <span class="keywordflow">case</span> <a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4ca7d49d1d76d666767ae5854465bb86347">tc::ErrorSeverity</a>:  str = tr(<span class="stringliteral">&quot;Error&quot;</span>); <span class="keywordflow">break</span>;
<a name="l00130"></a>00130     <span class="keywordflow">default</span>: str = tr(<span class="stringliteral">&quot;Unknown&quot;</span>); <span class="keywordflow">break</span>;
<a name="l00131"></a>00131   }
<a name="l00132"></a>00132   <span class="keywordflow">return</span> str;
<a name="l00133"></a>00133 }
<a name="l00134"></a>00134 <span class="comment"></span>
<a name="l00135"></a>00135 <span class="comment">/** Compares &lt;b&gt;other&lt;/b&gt; to this log message item based on the current sort</span>
<a name="l00136"></a>00136 <span class="comment"> * column. */</span>
<a name="l00137"></a>00137 <span class="keywordtype">bool</span>
<a name="l00138"></a><a class="code" href="class_log_tree_item.html#a19650deac30c1b0648e5cc9bd690b381">00138</a> <a class="code" href="class_log_tree_item.html#a19650deac30c1b0648e5cc9bd690b381">LogTreeItem::operator&lt;</a>(<span class="keyword">const</span> QTreeWidgetItem &amp;other)<span class="keyword"> const</span>
<a name="l00139"></a>00139 <span class="keyword"></span>{
<a name="l00140"></a>00140   <a class="code" href="class_log_tree_item.html">LogTreeItem</a> *that = (<a class="code" href="class_log_tree_item.html">LogTreeItem</a> *)&amp;other;
<a name="l00141"></a>00141   <span class="keywordtype">int</span> sortColumn = (treeWidget() ? treeWidget()-&gt;sortColumn() : <a class="code" href="_log_header_view_8cpp.html#af25e7f0ebd0909e7109233e8ea4c3019">COL_TIME</a>);
<a name="l00142"></a>00142    
<a name="l00143"></a>00143   <span class="keywordflow">switch</span> (sortColumn) {
<a name="l00144"></a>00144     <span class="keywordflow">case</span> <a class="code" href="_log_header_view_8cpp.html#af25e7f0ebd0909e7109233e8ea4c3019">COL_TIME</a>:
<a name="l00145"></a>00145       <span class="comment">/* Sort chronologically */</span>
<a name="l00146"></a>00146       <span class="keywordflow">return</span> (this-&gt;_seqnum &lt; that-&gt;<a class="code" href="class_log_tree_item.html#a8a6810ffc4f0b748277853139b40b5c0">_seqnum</a>);
<a name="l00147"></a>00147     <span class="keywordflow">case</span> <a class="code" href="_log_header_view_8cpp.html#a83d55c64786e4f462270b201839c4cbb">COL_TYPE</a>:
<a name="l00148"></a>00148       <span class="comment">/* Sort by severity, then chronologically */</span>
<a name="l00149"></a>00149       <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_log_tree_item.html#a6a76ab403c2c9189a28f260a08dd9e50">severity</a>() == that-&gt;<a class="code" href="class_log_tree_item.html#a6a76ab403c2c9189a28f260a08dd9e50">severity</a>()) {
<a name="l00150"></a>00150         <span class="keywordflow">return</span> (this-&gt;_seqnum &lt; that-&gt;_seqnum);
<a name="l00151"></a>00151       }
<a name="l00152"></a>00152       <span class="comment">/* The comparison is flipped because higher severities have </span>
<a name="l00153"></a>00153 <span class="comment">       * lower numeric values */</span>
<a name="l00154"></a>00154       <span class="keywordflow">return</span> (this-&gt;<a class="code" href="class_log_tree_item.html#a6a76ab403c2c9189a28f260a08dd9e50">severity</a>() &gt; that-&gt;<a class="code" href="class_log_tree_item.html#a6a76ab403c2c9189a28f260a08dd9e50">severity</a>());
<a name="l00155"></a>00155     <span class="keywordflow">default</span>:
<a name="l00156"></a>00156       <span class="comment">/* Sort by message, then chronologically */</span>
<a name="l00157"></a>00157       QString thisMessage = this-&gt;<a class="code" href="class_log_tree_item.html#a985987181f25631224c95845b4a2575e">message</a>().toLower();
<a name="l00158"></a>00158       QString thatMessage = that-&gt;<a class="code" href="class_log_tree_item.html#a985987181f25631224c95845b4a2575e">message</a>().toLower();
<a name="l00159"></a>00159       
<a name="l00160"></a>00160       <span class="keywordflow">if</span> (thisMessage == thatMessage) {
<a name="l00161"></a>00161         <span class="keywordflow">return</span> (this-&gt;_seqnum &lt; that-&gt;_seqnum);
<a name="l00162"></a>00162       }
<a name="l00163"></a>00163       <span class="keywordflow">return</span> (thisMessage &lt; thatMessage);
<a name="l00164"></a>00164   }
<a name="l00165"></a>00165   <span class="keywordflow">return</span> <a class="code" href="class_log_tree_item.html#a19650deac30c1b0648e5cc9bd690b381">QTreeWidgetItem::operator&lt;</a>(other);
<a name="l00166"></a>00166 }
<a name="l00167"></a>00167 
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Mon Aug 30 22:58:54 2010 for Vidalia by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>