<!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/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <meta name="generator" content="pandoc" />
  <title></title>
  <style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<p>Hi Rajeesh,</p>
<p>It is not advisable to simply <em>copy+paste</em> a patch generated by <code>git format-patch</code> into the mail-client of choice without making sure that it does not add additional formatting to the message.</p>
<p>The patch you have submitted has been a victim of automatic, as I assume that you did not do this yourself, line-wrapping. Something which easily is recognized by looking at it through <em>patchwork</em>:</p>
<ul>
<li>https://patches.videolan.org/patch/14962/</li>
</ul>
<p>Please resubmit a correctly formatted patch, and if you want to do it as a reply in this thread; simply state your business in a regular message, and then add the <code>.patch</code> as an attachment.</p>
<p>On 2016-11-07 20:06, Rajeesh K V wrote:</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> diff --git a/modules/gui/qt/dialogs/open.cpp b/modules/gui/qt/dialogs/open.cpp
 index 224cfa5..86f5d00 100644
 --- a/modules/gui/qt/dialogs/open.cpp
 +++ b/modules/gui/qt/dialogs/open.cpp
 @@ -156,6 +156,7 @@ OpenDialog::OpenDialog( QWidget *parent,
     CONNECT( ui.slaveText, textChanged( const QString& ), this, updateMRL() );
     CONNECT( ui.cacheSpinBox, valueChanged( int ), this, updateMRL() );
     CONNECT( ui.startTimeTimeEdit, timeChanged ( const QTime& ), this, updateMRL() );
 +    CONNECT( ui.stopTimeTimeEdit, timeChanged ( const QTime& ), this, updateMRL() );</code></pre>
</blockquote>
<p>The above indentation is undesirable, and can be interpreted as if there is something special with the line in question (which is not true).</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code>     BUTTONACT( ui.advancedCheckBox, toggleAdvancedPanel() );
     BUTTONACT( ui.slaveBrowseButton, browseInputSlave() );

 @@ -179,6 +180,7 @@ OpenDialog::OpenDialog( QWidget *parent,

     /* enforce section due to .ui bug */
     ui.startTimeTimeEdit->setCurrentSection( QDateTimeEdit::SecondSection );
 +    ui.stopTimeTimeEdit->setCurrentSection( QDateTimeEdit::SecondSection );</code></pre>
</blockquote>
<p>See previous comment regarding indentation.</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code>     setMinimumSize( sizeHint() );
     setMaximumWidth( 900 );
 @@ -436,12 +438,12 @@ void OpenDialog::updateMRL() {
     mrl += QString( " :%1=%2" ).arg( storedMethod ).
                                 arg( ui.cacheSpinBox->value() );
     if( ui.startTimeTimeEdit->time() != ui.startTimeTimeEdit->minimumTime() ) {
 -        mrl += QString( " :start-time=%1.%2" )
 -                .arg( QString::number(
 -                    ui.startTimeTimeEdit->minimumTime().secsTo(
 -                        ui.startTimeTimeEdit->time()
 -                ) ) )
 -               .arg( ui.startTimeTimeEdit->time().msec(), 3, 10, QChar('0') );
 +        mrl += " :start-time=" +
 QString::number(static_cast<double>(ui.startTimeTimeEdit->
 +                                minimumTime().msecsTo(ui.startTimeTimeEdit->time() )
 )/1000.0,'f',3);</code></pre>
</blockquote>
<p>The <code>quint64</code> returned by <code>.msecsTo</code> will be implicitly converted to a <code>double</code> given that it is being divided by one; there is no need for the <code>static_cast</code>.</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> +    }
 +    if( ui.stopTimeTimeEdit->time() > ui.startTimeTimeEdit->time() ) {
 +        mrl += " :stop-time=" +
 QString::number(static_cast<double>(ui.stopTimeTimeEdit->
 +                                minimumTime().msecsTo(ui.stopTimeTimeEdit->time() )
 )/1000.0,'f',3);
     }
     ui.advancedLineInput->setText( mrl );
     ui.mrlLine->setText( itemsMRL.join( " " ) );
 diff --git a/modules/gui/qt/ui/open.ui b/modules/gui/qt/ui/open.ui
 index ea510db..05d8193 100644
 --- a/modules/gui/qt/ui/open.ui
 +++ b/modules/gui/qt/ui/open.ui
 @@ -169,6 +169,19 @@
         </property>
        </widget>
       </item>
 +      <item row="1" column="3">
 +       <widget class="QLabel" name="label_3">
 +        <property name="text">
 +         <string>Stop Time</string>
 +        </property>
 +        <property name="alignment">
 +         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 +        </property>
 +        <property name="buddy">
 +         <cstring>stopTimeTimeEdit</cstring>
 +        </property>
 +       </widget>
 +      </item>
       <item row="8" column="0">
        <widget class="QLabel" name="label">
         <property name="text">
 @@ -241,6 +254,25 @@
         </property>
        </widget>
       </item>
 +      <item row="1" column="4" colspan="2">
 +       <widget class="QTimeEdit" name="stopTimeTimeEdit">
 +        <property name="toolTip">
 +         <string>Change the stop time for the media</string>
 +        </property>
 +        <property name="alignment">
 +         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 +        </property>
 +        <property name="currentSection">
 +         <enum>QDateTimeEdit::HourSection</enum>
 +        </property>
 +        <property name="displayFormat">
 +         <string>HH'H':mm'm':ss's'.zzz</string>
 +        </property>
 +        <property name="timeSpec">
 +         <enum>Qt::LocalTime</enum>
 +        </property>
 +       </widget>
 +      </item>
       <item row="4" column="0" colspan="6">
        <widget class="QCheckBox" name="slaveCheckbox">
         <property name="text">
 @@ -271,6 +303,7 @@
   <tabstop>advancedCheckBox</tabstop>
   <tabstop>cacheSpinBox</tabstop>
   <tabstop>startTimeTimeEdit</tabstop>
 +  <tabstop>stopTimeTimeEdit</tabstop></code></pre>
</blockquote>
<p>See previous comment regarding indentation.</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code>   <tabstop>slaveCheckbox</tabstop>
   <tabstop>slaveText</tabstop>
   <tabstop>slaveBrowseButton</tabstop></code></pre>
</blockquote>
</body>
</html>